home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / misc / sci / dproc126.lha / docs / DataProc.hlp < prev    next >
Text File  |  1993-02-28  |  113KB  |  2,711 lines

  1. 1 dataproc
  2.  DataProc is a command-driven data processing program, which works much
  3.  like a tabular calculation program. DataProc reads in a command file
  4.  holding commands and data and can produce a number of different output
  5.  files for further processing with other software. DataProc is especially
  6.  designed to work with GNUPLOT and LaTeX. Both of the latter are available
  7.  as public domain software on almost any computer system.
  8.  
  9.  Beyond the standard mathematics to apply on data several statistic specials
  10.  like regression and averaging are implemented.
  11.  
  12.  You should pass a filename to DataProc. This file wil be read and executed
  13.  by DataProc. The default extension for this file is '.tst'. So DataProc
  14.  tries to open <filename.tst> if <filename> is not available. E.g.:
  15.  
  16.             DataProc project.tst
  17.             DataProc project
  18.  
  19.  are equivalent, unless a file named 'project' exists, which will then be
  20.  read by the second line. If the file 'project.tst' does not exist an error
  21.  will be issued.
  22.  
  23.  If you don't pass a commandfilename, DataProc will enter the interactive
  24.  mode. Anything you enter behind the prompt will be executed just like
  25.  a commandfile line. As comments don't seem to make sense in interactive
  26.  mode, any comments will be interpreted as include file names. See
  27.  `commands include` for more information. An example session might be:
  28.  
  29.             TeX:physics> DataProc
  30.             DataProc 1.221 (24.1.93)
  31.             © 1992 by MGR, Asgard
  32.             This Amiga copy is registered to Lars Hanke #: 000012
  33.  
  34.             1 > *project1
  35.           [messages from execution of project1.tst]
  36.             2 > *project2
  37.           [messages from execution of project2.tst]
  38.             3 > #quit
  39.  
  40.             TeX:physics>
  41.  
  42. 2 politics
  43.  
  44.  Some words about software in general. Never use original files to run
  45.  software. Always create copies and run them, because you will never
  46.  know what might happen to the software.
  47.  
  48.  If you have problems getting started with the evaluation copy, contact
  49.  me immediately, no matter if you want this program or not. I cannot
  50.  test the software on a lot of systems with different configurations
  51.  and it may do really weired things on other systems. If I do not come
  52.  to know it, this won't change ever and at most leads to a bad reputation
  53.  of the program.
  54.  
  55. 3 distribution
  56.  
  57.  In a nutshell, DataProc may be distributed freely as long as
  58.  the following restrictions are met:
  59.  
  60.  The distributor may only charge a fee up to the costs of
  61.  obtaining a public domain diskette from Fred Fish. The
  62.  distributor agrees to cease distributing the programs and data
  63.  involved if requested to do so by the author. The distributor
  64.  may only distribute an unmodified copy of the original program,
  65.  with all the supplied documentation and copyright notices
  66.  intact.
  67.  
  68.  For more details, see the section called `License`.
  69.  
  70. 3 support
  71.  
  72.  If you have any suggestions, bug reports etc., feel free to
  73.  contact the author of DataProc at the address given in the
  74.  section "Registration". Additionally, you can reach me at:
  75.  
  76.           Lars Hanke
  77.           FIDO:   2:245/5802.22
  78.           UUCP:   mgr@asgard.bo.open.de
  79.  
  80. 3 license
  81.  
  82.  1. This license applies to the product called "DataProc", a
  83.  program available for the Amiga computer and MS-DOS (tm) machines,
  84.  published by Lars Hanke under the concepts of ShareWare, and
  85.  the accompanying documentation, example files and anything else
  86.  that comes with the original distribution. The terms "Programs"
  87.  and "DataProc" below, refer to this product. The license is
  88.  addressed as "you".
  89.  
  90.  2. You may copy and distribute verbatim copies of the
  91.  programs' executable code and documentation as you receive it,
  92.  in any medium, provided that you conspicuously and appropriately
  93.  publish only the original, unmodified programs, with all
  94.  copyright notices and disclaimers of warranty intact and
  95.  including all the accompanying documentation, example files and
  96.  anything else that came with the original.
  97.  
  98.  3. You may not copy and/or distribute these programs without
  99.  the accompanying documentation and other additional files that
  100.  came with the original. You may not copy and/or distribute
  101.  modified versions of these programs.
  102.  
  103.  4. You may not copy, modify, sublicense, distribute or
  104.  transfer the programs except as expressly provided under this
  105.  license. Any attempt otherwise to copy, modify, sublicense,
  106.  distribute or transfer the programs is void, and will
  107.  automatically terminate your rights to use the programs under
  108.  this license.
  109.  
  110.  5. By copying, distributing and/or using the programs you
  111.  indicate your acceptance of this license to do so, and all its
  112.  terms and conditions.
  113.  
  114.  6. Each time you redistribute the programs, the recipient
  115.  automatically receives a license from the original licensor to
  116.  copy, distribute and/or use the programs subject to these terms
  117.  and conditions.  You may not impose any further restrictions on
  118.  the recipients' exercise of the rights granted herein.
  119.  
  120.  7. You may not disassemble, decompile, re-source or otherwise
  121.  reverse engineer the programs.
  122.  
  123.  8. You may use the programs for a period of up to 40 days for
  124.  evaluation.  After that, you have to register.
  125.  
  126.  9. If you wish to incorporate parts of the programs into other
  127.  programs, write to the author to ask for permission.
  128.  
  129.  10. You agree to cease distributing the programs and data
  130.  involved if requested to do so by the author.
  131.  
  132.  11. You may charge a fee to recover distribution costs. The
  133.  fee for diskette distribution may not be more than the cost to
  134.  obtain a public domain diskette from Fred Fish.
  135.  
  136. 3 warranty
  137.  
  138.  THERE IS NO WARRANTY FOR THE PROGRAMS, TO THE EXTENT PERMITTED
  139.  BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
  140.  COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAMS "AS
  141.  IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
  142.  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  143.  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE
  144.  ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMS IS
  145.  WITH YOU.  SHOULD THE PROGRAMS PROVE DEFECTIVE, YOU ASSUME THE
  146.  COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  147.  
  148.  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  149.  WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  150.  REDISTRIBUTE THE PROGRAMS AS PERMITTED ABOVE, BE LIABLE TO YOU
  151.  FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
  152.  CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
  153.  THE PROGRAMS (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
  154.  BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
  155.  PARTIES OR A FAILURE OF THE PROGRAMS TO OPERATE WITH ANY OTHER
  156.  PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED
  157.  OF THE POSSIBILITY OF SUCH DAMAGES.
  158.  
  159. 3 disclaimer
  160.  
  161.  No warranty, either express or implied, is made with respect
  162.  to the fitness or merchantability of DataProc.
  163.  
  164.  Lars Hanke (referred to as "the author"), reserves the right to not
  165.  develop any future versions of DataProc.
  166.  
  167.  The author will try to make a good faith attempt at
  168.  correcting any problems if any are discovered, but is in no way
  169.  required, nor bound to correct them.
  170.  
  171.  The author neither assumes nor accepts any responsibility for
  172.  the use or misuse of these programs. He also will not be held
  173.  liable for damages or any compensation beyond the original
  174.  registration fee due to loss of profit or any other damages
  175.  arising out of the use, or inability to use these programs.
  176.  
  177.  Lars Hanke will not be liable for any damage arising from the failure
  178.  of these programs to perform as described, or any destruction of other
  179.  programs or data residing on a system attempting to run the programs.
  180.  This does not depend on my knowledge of damaging errors in the programs.
  181.  
  182.  I may change prices and distribution conditions at will, with every new
  183.  revision of the programs. I cannot be forced to distribute old revisions.
  184.  Registrations not meeting the current conditions will lead me to inform
  185.  you of the changes. You may then cancel your registration or meet the
  186.  new conditions. Note that you have to express any interest in special
  187.  distribution conditions explicitly, or I will assume that you agree with
  188.  the current conditions. Lars Hanke is not liable for any costs of monetary
  189.  transfers and other expenses concerning a cancelled registration.
  190.  
  191. 3 registration
  192.  As already mentioned, this program is Shareware. Shareware is neither
  193.  Public Domain, nor Freeware, nor Giftware, nor Copyleft. If you decide
  194.  to use this program, you must pay for it! If you don't pay, but use, this
  195.  is software piracy, with all its legal consequences.
  196.  
  197.  Some reasons to register: First of all, to stay legal, but as nobody cares
  198.  nowadays, there are some other good reasons. An important reason is the
  199.  support of the shareware idea. You don't buy shareware blindly, but you
  200.  may test it thoroughly before. But if nobody pays, it is only a logical
  201.  consequence that no-one will write shareware anymore and finally you have
  202.  no chance, but buying software blindly. Finally the support of Shareware
  203.  programmers will encourage them to care for their programs and you are
  204.  more likely to get the same support as with commercial software.
  205.  
  206.  Unfortunately, experience tells us that those reasons aren't too convincing
  207.  for a lot of users. Well, here are some reasons to register DataProc.
  208.  First of all, the banner message will change from "unregistered" to your
  209.  name and registration number. Then you will be able to install DataProc
  210.  anywhere in your path, the evaluation copy may only be started form its
  211.  own location directory. Finally those nerve-racking Shareware posters
  212.  with its requests for keyboard input during the execution of your commandfile
  213.  will disappear. The evaluation copy of DataProc is fully operative, but
  214.  has limitations to the possibilities of automatic execution e.g. during
  215.  batch jobs and to a proper installation in your system, e.g. paths or
  216.  packing of the program. Due to a loss of dumb checks whether the copy may
  217.  be used or not, the registered software improves a great deal in performance,
  218.  especially the reloading of the own code in bytes will drop.
  219.  
  220.  Remember, a software worth using is a software worth buying. And don't tell
  221.  me you can't afford DM 25.--, you could still sell your computer! This
  222.  price is for registration only. The keyfile will be sent via UseNet. If
  223.  you don't want your keyfile via UseNet or would like an update included
  224.  add DM 2.-- for European Union countries or DM 5.-- for countries outside
  225.  the EU, and I will send a disk including your keyfile and the most recent
  226.  DataProc version. Note: If the service "keyfile via email" becomes too
  227.  excessive, I may quit that service at will, either mine or the will of
  228.  my mailservers.
  229.  
  230.  Send your registration (including: Name and address, DataProc version,
  231.  source you got DataProc from, your system configuration and your EMAIL
  232.  address) to:
  233.  
  234.          MGR, Asgard
  235.          Lars Hanke
  236.          Schlachthofstr. 67
  237.          D-4690 Herne 2
  238.  
  239.          FIDO: 2:245/5802.22
  240.          UUCP: mgr@asgard.bo.open.de
  241.  
  242.  This is also the adress to send suggestions and bug reports to. For urgent
  243.  bug reports try:
  244.  
  245.                bugs@asgard.bo.open.de
  246.  
  247.  If you intend to install this programm on a multi user system, or are
  248.  interested in ports to other machines or want to customize it, send me a
  249.  note. I will gladly cooperate.
  250.  
  251. 3 credits
  252.  Thanks to the developers of GNU-Plot and TeX. The existance of those
  253.  products was the main influence to start this project. Also the basic
  254.  layout of the user interface was drawn from there. This does of course
  255.  in no way apply to any code used for DataProc.
  256.  
  257.  Thanks to TrapLand, showing me that SHAREWARE might work even in Europe.
  258.  I hope you don't mind that I took your legal stuff as the basis of the
  259.  DataProc license.
  260.  
  261.  Thanks to Mr. Teulings, Mr. Preuß for beta testing and Mr. Kulka for
  262.  alpha testing. Thanks as well to Mr. Böllmann and Mr. Beisemann for
  263.  lending me their machines for the MS-DOS compilation.
  264.  
  265.  Thanks to Mr. Teulings for "WRITE" coping with those goddamned space
  266.  syntax in the .doc file.
  267.  
  268.  Thanks to all those helpful guys round FIDO and UseNet, helping me
  269.  with coding and porting problems.
  270.  
  271.  Thanks to Commodore for producing the Amiga and to SAS for their
  272.  prompt help and support of their compiler.
  273.  
  274.  Finally thanks to me for not needing any sleep at all and to my dog
  275.  for generously freeing me of that task, sleeping for both of us.
  276.  
  277.  Thanks to Odin, the Aesir and the Runes for my name and logo.
  278.  
  279. 2 basics
  280. 3 syntax
  281.  There are some basic rules about the structure of command files. In general
  282.  empty lines and the number of spaces are ignored. The same is with leading
  283.  and trailing spaces, tabs or whatsoever. DataProc does not distinguish
  284.  between different spacing characters.
  285.  
  286.  The characters '*', ';' and '%' mark a commentline, which is ignored. Inline
  287.  comments are not yet supported. Note that in interactive mode the line
  288.  following the comment sign will be passed as arguments to the include
  289.  command. See `commands include` for more information.
  290.  
  291.  The characters '!' and '$' will post whatever they are followed in that line
  292.  on screen during the execution of the commandfile. They should be used to
  293.  supervise proper operation of a commandfile.
  294.  
  295.  A commandline is made up by ASCII characters and ends with the EOL character
  296.  (usu. $0a). By now you cannot mark a line as a follower.
  297.  
  298.  Commandlines are made up by tokens. Each token is seperated by either a space
  299.  or ':', '/' or '&'. While '//' declares an empty token two spaces do not.
  300.  (See above). Since Version 1.108 system tokens aren't case sensitive anymore.
  301.  Strings you define yourself of course won't be translated to a special case.
  302.  
  303.  Tokens may hold seperators, if they are enclosed in grouping characters.
  304.  These grouping character pairs are: () or [] or '' or "". The grouping
  305.  pairs may not nest. If an opener (bra) is encountered, the input line will
  306.  be copied to the token until the corresponding close character (ket) is
  307.  found.
  308.  
  309.  Commandlines hold either a command or data. The line is interpreted as a
  310.  command, if it begins with a sharp sign '#'. In any other case DataProc
  311.  expects data to be there.
  312.  
  313. 3 organization
  314.  Internally DataProc works much like a spread sheet program. It inits a table
  315.  of a user defined length and can add an arbitrary number of columns to it.
  316.  Commands usually affect a whole column. As you might guess the column is the
  317.  basic unit in DataProc. That is the major difference to a tabular calculator
  318.  where the cell serves as its unit.
  319.  
  320.  Each column has one physical and two logical numbers. The physical is the
  321.  basic reference. It is simply the number of the column as it was declared
  322.  by the `columns` command.
  323.  
  324.  Beyond that each column may be assigned a specific read column and a write
  325.  column, meaning the order data is read into them or written from them. For
  326.  more information see `using` and `ocol`.
  327.  
  328. 3 mathematics
  329.  DataProc supplies a scientific calculator. You may define your own constants,
  330.  variables and functions. Read the following for its syntax:
  331.  
  332.    ATOM        - Atoms are plain Values like 7.65e-12 and constants like PH
  333.                  Functions are treated as atoms as well, but the arguments
  334.                  are itself Expressions
  335.  
  336.    OPERATOR    - The currently supported operators are + - * / ^ with the
  337.                  commonly known meaning. Missing operators like in 3sin(x)
  338.                  or 3 4 are treated as '*' so that the former expressions
  339.                  would be expanded to 3*sin(x) and 3*4. Operators obey the
  340.                  common priority rules.
  341.  
  342.    BRACES      - grouping characters. You may set Expressions into pairs of
  343.                  corresponding braces. All types are treated equally, but
  344.                  must of course match. The brace pairs are: [] {} ()
  345.                  Thus (3*[4+5]-2)/6 would work but (3*[4+5)-2]/6 would not!
  346.  
  347.    EXPRESSION  - any valid combination of Atoms, Operators and Braces.
  348.                  ATOM OPERATOR ATOM
  349.                  EXPRESSION OPERATOR EXPRESSION
  350.                  ATOM ATOM                      => OPERATOR = '*'
  351.                  EXPRESSION EXPRESSION          (dto.)
  352.                  ([{ EXPRESSION }])             => treated as ATOM in this
  353.                                                    level
  354.    NAME        - Names start with an alphabetic character and may be followed
  355.                  by any combination of alphanumeric characters. The total
  356.                  length must not exceed 29 characters. Names are not case
  357.                  sensitive.
  358.  
  359.    VARIABLE    - NAME followed by OPERATOR or end of line
  360.  
  361.    FUNCTION    - NAME followed by an opening brace. In defines this must be
  362.                  an opening parenthesis '('. Note that a defined VARIABLE
  363.                  in the combination VARIABLE(... will be correctly interpreted
  364.                  as VARIABLE*(... and a defined FUNCTION in the combination
  365.                  FUNCTION EXPRESSION will lead to the message --> Argument
  366.                  expected. Note also that spaces are ignored, except for
  367.                  separation numbers, so that 3 4 is interpreted as 3*4 and
  368.                  34 is interpreted as 34.
  369.  
  370.    DEFINE      - ":=" defines or redefines a variable or function. When
  371.                  defining a function the next character must be '(' (spaces
  372.                  are ignored)
  373.                  VARIABLE:=EXPRESSION                 => define a symbolic
  374.                                                          variable
  375.                  FUNCTION(VARIABLE,...):=EXPRESSION   => define a new function
  376.  
  377.                  Note that the template arguments are not stored to the
  378.                  variable list. If identical entries exist in the variable
  379.                  list they will not be recognized -- the template has higher
  380.                  priority. Note as well that global variables are evaluated
  381.                  immediately, so later changes won't affect the function.
  382.  
  383.    COMMENTS    - The line is terminated by any nonprintable character or a
  384.                  semicolon <;>. The rest can be used for comments.
  385.  
  386.    RESERVED    - In future versions the following symbols may come to a
  387.                  meaning, so do not put your own stuff on them! The charcters
  388.                  are: ! _ _i _[]
  389.  
  390.  
  391.  `SYMBOLS`
  392.  
  393.  The following symbols are predefined:
  394.  
  395.    PI          - you now that number (3.14...), don't you?
  396.    ME          - the Euler number                  (2.718...)
  397.    RT2         - the square root of 2              (1.41...)
  398.    PH          - Planck's quantum                  (6.626...e-34)
  399.    PHB         - Planck's quantum divided by 2*PI
  400.    PE0         - electrical field constant SI      (8.854...e-12)
  401.    PU0         - magnetical filed constant SI      (1.256...e-6)
  402.    PC          - light speed in m/s                (2.997...e8)
  403.    PK          - Boltmann constant                 (1.380...e-23)
  404.    PR          - general gas constant              (8.31441)
  405.    PSIGMA      - Stefan-Boltzmann constant         (5.670...e-8)
  406.    PE          - charge of electron in C           (1.602...e-19)
  407.    PME         - mass of electron in kg            (9.109...e-31)
  408.    PBM         - Bohr's magneton in Am^2           (9.274...e-24)
  409.    PMP         - mass of proton
  410.    PMN         - mass of neutron
  411.    PF          - gravity constant                  (6.672...e-11)
  412.    PG          - standard earth acceleration       (-9.80665)
  413.    PKEL0       - absulute zero temperature         (-273.15)
  414.    PPN         - normal pressure in Pa             (101325)
  415.    PVM0        - ideal gas molaric volume in l     (22.41...)
  416.    PNA         - particles per mol                 (6.022...e23)
  417.    PFARAD      - Faraday constant                  (9.648...e4)
  418.    PRH         - Rydberg constant                  (1.097...e7)
  419.    PLC         - Compton wavelength                (2.426...e-12)
  420.    PSOLAR      - solar constant                    (1.368e6)
  421.  
  422.    N2KP        - newton to kilopond                (0.102)
  423.    MS2KMH      - m/s to km/h                       (3.6)
  424.    J2MEV       - Joule to MeV                      (6.241e12)
  425.    TORR2P      - Torr to Pascal                    (133)
  426.    U2KG        - u (nuclear mass unit) to kg       (1.660...e-27)
  427.    KG2MEV      - kg to equivalent energy in MeV    (5.609...e29)
  428.    U2MEV       - u to MeV                          (931.433...)
  429.    LY2M        - light years to meters             (9.465...e15)
  430.    AE2M        - astronomic units to meters        (1.495...e11)
  431.    PARSEC      - Parsec to meters                  (3.085...e16)
  432.    IN2CM       - inches to centimeters             (2.54)
  433.    FT2CM       - feet to centimeters               (30.48)
  434.    YD2CM       - yards to centimeters              (91.44)
  435.    MILE2KM     - miles to kilometers               (1.609)
  436.    PS2KW       - german horsepowers to kilowatts   (0.736)
  437.    CAL2J       - calories to Joule                 (4.1868)
  438.  
  439.    EXA         - scaling syllable                  (1e18)
  440.    PETA        -                                   (1e15)
  441.    TERA        -                                   (1e12)
  442.    GIGA        -                                   (1e9)
  443.    MEGA        -                                   (1e6)
  444.    KILO        -                                   (1e3)
  445.    HEKTO       -                                   (1e2)
  446.    DECA        -                                   (10)
  447.    DECI        -                                   (0.1)
  448.    CENTI       -                                   (1e-2)
  449.    MILLI       -                                   (1e-3)
  450.    MICRO       -                                   (1e-6)
  451.    NANO        -                                   (1e-9)
  452.    PICO        -                                   (1e-12)
  453.    FEMTO       -                                   (1e-15)
  454.    ATTO        -                                   (1e-18)
  455.  
  456.  Arguments of trigonometric functions are expected in radian!
  457.  
  458.    SIN(x)      - sine function                     sin(x)
  459.    COS(x)      - cosine function                   cos(x)
  460.    TAN(x)      - tangent function                  tan(x)
  461.    COT(x)      - cotangent function                cot(x)
  462.    SEC(x)      - secant function (1/sin)           sec(x)
  463.  
  464.    ASIN(x)     - arcus sine function               arc sin(x)
  465.    ACOS(x)     - arcus cosine function             arc cos(x)
  466.    ATAN(x)     - arcus tangent function            arc tan(x)
  467.    ACOT(x)     - arcus cotangent function          arc cot(x)
  468.    ASEC(x)     - arcus secant function             arc sec(x)
  469.  
  470.    SINH(x)     - hyperbolic sine                   sinh(x)
  471.    COSH(x)     - hyperbolic cosine                 cosh(x)
  472.    TANH(x)     - hyperbolic tangent                tanh(x)
  473.  
  474.    ASINH(x)    - area hyperbolic sine              ar sinh(x)
  475.    ACOSH(x)    - area hyperbolic cosine            ar cosh(x)
  476.    ATANH(x)    - area hyperbolic tangent           ar tanh(x)
  477.  
  478.    SQR(x)      - square of x -- faster than x^2    x^2
  479.    SQRT(x)     - square root                       x^(.5)
  480.    ROOT(y,x)   - yth root of x                     x^(1/y)
  481.  
  482.    LN(x)       - natural logarithm                 ln(x)
  483.    LG(x)       - decadic logarithm                 log10(x)
  484.    LOG(y,x)    - logarithm based y                 log_y(x)
  485.    EXP(x)      - xth power of Euler constant       e^x
  486.  
  487.    FAC(x)      - faculty of int(x)                 x!
  488.  
  489.    RAD(x)      - convert degree argument to radians
  490.    DEG(x)      - convert radian argument to degrees
  491.  
  492.    ABS(x)      - absolute value                    |x|
  493.    SGN(x)      - signum function                   sgn(x)
  494.  
  495.    MAX(x,y)    - returns the greater of x and y
  496.    MIN(x,y)    - returns the smaller of x and y
  497.  
  498.  Concluding Notes: Unlike most math programs the operator '/' is interpretd
  499.  as a fraction bar, so everything behind it is interpreted as the denomiator
  500.  unless an addition operator '+' or '-' is encountered. E.g.:
  501.  
  502.    40/4*5   results in 2
  503.    15/45/9  results in 3
  504.    6/3+2    results in 4 (!)
  505.  
  506.  There is a conceptional bug in the handling of the '-' operator. Do not
  507.  chain them. Instead write: EXPRESSION - (EXPRESSION + EXPRESSION). Also
  508.  the monadic '-' does not always work the way it should. (-ATOM) usually
  509.  does.
  510.  
  511.  I won't fix the bugs in the math module, but I am going to completely
  512.  rewrite it, because the concept cannot hold sums, integrals, etc. The
  513.  new module will support integration and symbolic differentiation as
  514.  well.
  515.  
  516. 2 commands
  517. 3 general
  518.  The command is the first `token` in a `commandline`. Commands always start
  519.  with a leading sharp sign '#'. Commands aren't case sensitive anymore.There
  520.  must not be any space between the sharp and the command.
  521.  
  522.  As most commands affect one specific column there is a syntax that is
  523.  common to most commands:
  524.  
  525.       #command col arg1 ...
  526.  
  527.  where command is the command name and col is the physical 'column' to affect.
  528.  However, there are some commands that do not affect a specific column or more
  529.  than one, so col represents zero or more `tokens` in the general syntax. The
  530.  same is with the arguments.
  531.  
  532.  Any `commandfile` must contain the commands `dsize` and `columns`. So read
  533.  the sections concerning those commands carefully.
  534.  
  535. 3 variables
  536.  There are three types of variables maintained by the program that aren't
  537.  related in any way, may not be mixed up and cannot be processed together
  538.  in any way. Except for the fourth variable that may be build from two
  539.  of the latter.
  540.  
  541.  The most important are the math processor's variables. Beyond what was said
  542.  in the math processor section, you may use them as data to write to columns
  543.  and `post` them on screen, by means of the equally named command. Specifying
  544.  "$=" in a `data` field makes a maths variable available to the data stream.
  545.  See the `data` section for more information about that. Math variables are
  546.  not cleared by the `reset` command.
  547.  
  548.  Global variables -- it's just a name, math variables are of course global as
  549.  well -- are used to make the `commandfile` handier and more readable. Global
  550.  variables may replace any number `token` of any command, no care if it is
  551.  a column number, function number, row boundary or whatever. It will be much
  552.  easier to reference columns and functions by name than to keep track of
  553.  hundreds of abstract numbers. The `mark` command even frees you of the task
  554.  to count data rows for your boundaries. See `define`, `queue`, `mark` and
  555.  `undefine` for more information about global variables. Global variables
  556.  are cleared by the `reset` command.
  557.  
  558.  Terminal enviroment variables are local variables, meaning that their value
  559.  is set per terminal. Two different terminals may carry different values in
  560.  equally name variables. On the other hand they are not cleared by the
  561.  `reset` command. They are used to provide the terminal with additional
  562.  information of how to produce their output. See `set`, `unset` and the
  563.  `terminal` section for more information about enviroment variables.
  564.  
  565.  Since 1.159 `global strings` are supported. They are useful for two purposes.
  566.  First of all you can use computation results in `terminal enviroment`
  567.  variables, e.g. to add a fit curve to your data plot in the `GNUPLOT`
  568.  terminal. Secondary you can produce a better formatted output on
  569.  runtime.
  570.  
  571. 3 addcol
  572.  This command adds a new column to an existing table. Normally you should
  573.  use the `columns` command for that task, but `addcol` might produce more
  574.  readable code or in some cases may cope with memory problems.
  575.  
  576.  `addcol` must be followed by a number token, which is the physical column
  577.  number to generate. You may pass a name there and it will be assigned the
  578.  highest column number as a global variable. This is basically the way you
  579.  should use this function.
  580.  
  581.  The second token must be a format identifier as specified in the `columns`
  582.  command.
  583.  
  584.  Example:
  585.  
  586.        #addcol LastCol %f
  587.        #row 0
  588.        #using LastCol
  589.        #include "MyData.tst"
  590.  
  591.  This add a column behind all existing columns, reset the row counter and
  592.  read new data from "MyData.tst" to that column. LastCol would hold the
  593.  number of the new column.
  594.  
  595.  See also `columns` and `remcol`.
  596.  
  597. 3 applog
  598.  This command opens a file to store some scratch that you would usually
  599.  write on some sheet for further evaluation during the formulation of
  600.  your data analysis. If the file given with the first token already exists,
  601.  new lines will be appended to it.
  602.  
  603.  See also `newlog`, `logline` and `logpost`.
  604.  
  605. 3 areg
  606.  This is the most complex command implemented by now and it will hopefully
  607.  stay forever. `areg` enables you to do a least square approximation to any
  608.  function you like as long as you don't wish to optimize other than two
  609.  parameters. Note that for standard situations e.g. linear or logarithmic
  610.  regressions special commands are implemented so that you won't need this
  611.  command too often. See `lreg` and `logreg` for more information about
  612.  that.
  613.  
  614.  The syntax is long but logical. The `tokens` are in sequence: x-column,
  615.  y-column, function to match, partial derivation of the function according
  616.  to the first parameter (a), partial derivation of the function according
  617.  to the second parameter (b), estimation for a and estimation for b. While
  618.  all of the latter tokens oblige the following may be omitted: iteration
  619.  depth, start row and finally end row.
  620.  
  621.  The columns are indicated by their physical column number. The functions
  622.  are indicated by their number as assigned by the `func` command. For both
  623.  groups of numbers as well as for the start and end row, you may of course
  624.  use global variables. The functions are expected to take the parameters:
  625.  
  626.          y=f(a,b,x)
  627.  
  628.  in exactly that sequence. Take care that you only pass 3 parametred functions
  629.  matching the above convention.
  630.  
  631.  The token contents for the estimation values are passed to the maths
  632.  processor, so you may use its math variables or even mathematical expressions
  633.  for the estimation values. Note that `areg` is usually rapidly convergent,
  634.  but false estimations my even crash the iteration.
  635.  
  636.  If you pass zero to iteration depth or you omitted that token, `areg` will
  637.  work interactively. Thus it will stop after every iteration and show where
  638.  you are. If you're satisfied with the result, you leave the iteration
  639.  pressing the 'Q' key. Any other key will compute the next step.
  640.  
  641.  Finally you may specify the first and last row of data to include in the
  642.  regression. Row numbers start with 1 and both rows given as boundaries
  643.  will be included. If you specify zero or leave the token empty the maximum
  644.  value will be set, meaning the first row as start or the last row as end.
  645.  
  646.  The regression results are printed on screen during execution of the
  647.  `commandfile` and are stored to the math variables DPA holding the first
  648.  parameter result, DPB the second and DPSA and DPSB the corresponding
  649.  absolute errors.
  650.  
  651.  See also `lreg`, `logreg` and `func`.
  652.  
  653. 3 ask
  654.  Works just like `if` but the condition is given online by the user. The
  655.  rest of the line is promted to the screen and the user is asked to
  656.  enter 'Y' or 'J' for a true condition or 'N' for a false condition. The
  657.  command must further be handeled by `else` and `endif`.
  658.  
  659.  Note that setting a batch level higher or equal to 10 will always answer
  660.  this command with 'N'.
  661.  
  662.  Example:
  663.  
  664.        #ask Shall I do it?
  665.        ! I did it!
  666.        #else
  667.        ! why not?
  668.        #endif
  669.  
  670.  will print on screen "Shall I do it? (Y/J,N) > " If you type 'N', it will
  671.  post "why not?" or if you type 'Y' or 'J', it will post "I did it!"
  672.  
  673.  See also `if`, `else`, `endif`, `readvar`, `stop` and `batch`.
  674.  
  675.  
  676. 3 average
  677.  Followed by the `column` to average, an optional weight column that may be
  678.  left empty and the start and ending row, which as well may be left empty or
  679.  set zero.
  680.  
  681.  If a weight is specified DataProc computes the average to the weight given
  682.  in the designated column.
  683.  
  684.  If the startrow `token` is empty or zero the first row is defaulted. The
  685.  analogon is an empty or zero `token` for endrow that is interpreted as the
  686.  last row currently read.
  687.  
  688.  The results of the average computation is posted on screen during the
  689.  execution of the `commandfile`. The results are also stored to global
  690.  variables that may be accessed by the maths processor. DPMX holds the
  691.  computed mean and DPSMX its absolute error. DPMSX holds the average
  692.  absolute error (standard deviation). Those can be further processed using
  693.  `math`, `post` and `generate`.
  694.  
  695.  Example:
  696.  
  697.          #average 3
  698.          ! The average peripherial length is
  699.          #post dpmx*pi
  700.  
  701.  computes the unweighted average of all entries in column 3. If we assume
  702.  that column 3 holds the results of several attempts to measure the diameter
  703.  of a circle, it finally posts the average length of the peripherial on
  704.  screen.
  705.  
  706.  See also `mean`, `math`, `generate`, `post` and `lreg`.
  707.  
  708. 3 batch
  709.  This command sets a so called batch level. The next token must be a
  710.  number token, which is set as batch level. Default is batchlevel 0.
  711.  Any nonzero level will ignore all `stop` commands. A level higher
  712.  or equal to 10 will answer any `ask` command with 'N'.
  713.  
  714.  See also `ask` and `stop`.
  715.  
  716. 3 build
  717.  This command is used to assemble `global string` variables. It acts much
  718.  like typical print commands in many programming languages. The arguments
  719.  in sequence are: variable name, format string, arguments. Note that the
  720.  argument line is parsed as tokens, thus you will usually have to quote
  721.  the format string or mathematical expressions.
  722.  
  723.  The format string may contain %d (%ld) what believes the corresponding
  724.  argument to be a `global variable`, %f (%lf) is replaced by the result
  725.  of the given mathematical expression, %s what denotes a pure string or
  726.  a `global string` variable and finally %% producing the percent itself.
  727.  %f (%lf) may be followed by a single digit denoting the number of
  728.  significant cyphers just like the `prec` command. The precision defaults
  729.  to 7.
  730.  
  731.  Global strings can be evaluated by `build`, `post`, `preamble` and `set`.
  732.  
  733.  Example:
  734.  
  735.          #build mystr "The mean pressure is: %f +/- %f hPa" DPMX DPSMX
  736.          #post mystr
  737.  
  738.  This makes your script's runtime output a little more readable.
  739.  
  740. 3 closelog
  741.  Closes a note sheet file that has been opened by `newlog` or `applog`.
  742.  Usually you won't need this command, because DataProc closes all files
  743.  when closing down. Anyhow, if you like to print out your logfile during
  744.  execution, you must close it, before another application may open it
  745.  for further processing.
  746.  
  747.  Example:
  748.  
  749.        #applog "mylog.log"
  750.        ; do something
  751.        #closelog
  752.        #dos type mylog.log
  753.  
  754.  Will print out the log file "mylog.log" that had been generated or modified
  755.  in the same commandfile.
  756.  
  757.  See also `closetag`, `newlog` and `applog`.
  758.  
  759. 3 closetag
  760.  Closes a tag database file that has been opened by `tagfile`. Usually you
  761.  won't need this command as DataProc closes all files when closing down.
  762.  Anyhow, if you want other applications to work with it, before your
  763.  commandfile ends, you may make it accessible by this command. See `closelog`
  764.  for a typical application.
  765.  
  766.  See also `tagfile` and `closelog`.
  767.  
  768. 3 columns
  769.  The first `token` is expected to hold the number of columns for the table
  770.  to hold. Since version 1.204 this token is optional and may be omitted. If
  771.  you supply a number of columns it will be used. Note that any format
  772.  identifier beyond that mark will be ignored and if you supply less
  773.  identifiers this will cause an error.
  774.  
  775.  The next tokens hold format descriptors for the relating column. They are
  776.  just like the printf() C type format descriptors.
  777.  
  778.       %f    - float number
  779.       %lf   - float number (synonym to %f)
  780.       %d    - integer number
  781.       %s    - character string
  782.  
  783.  The sequence the columns are declared in makes their physical `column`
  784.  number. E.g.:
  785.  
  786.       #columns 3 %d %f %s
  787.  
  788.  would allocate space for three columns and declare the physical column
  789.  number 1 to hold integer numbers, physical column 2 to hold floats and
  790.  physical column 3 to hold strings.
  791.  
  792.  In addition the logical read and write numbers of the columns are inited
  793.  to the physical column number.
  794.  
  795.  See also `dsize` and `reset`.
  796.  
  797. 3 contract
  798.  This command is quite similar to `generate`. But unlike `generate` it
  799.  produces a new column by processing entries of the same column. It could
  800.  be used to compute the deltas between to entries, but that is already done
  801.  by `delta`.
  802.  
  803.  The first `token` holds the column to generate. Then the start and end row
  804.  follow. Empty tokens there or zeroes are interpreted as boundary values,
  805.  meaning first or last row. The next `token` holds the stepwidth, meaning
  806.  the distance between two rows to process together. So if you have a `data`
  807.  stream holding the occurences of maxima and minima, a stepwidth of 2 would
  808.  serve to compute the e.g. deltas between maxima and minima without mixing
  809.  them up. The next `token` holds the function number to use for processing.
  810.  The following tokens build a column list, so you can use the information of
  811.  more than one column.
  812.  
  813.  The function arguments are passed in the following manner: Current row of
  814.  the first `column` in the list, current row plus stepwidth of the first
  815.  `column` in the list, current row of the second column in the list and so
  816.  on.
  817.  
  818.  The destination is written to the destination column at current row plus
  819.  stepwidth. The first stepwidth rows in the destination are thusly marked
  820.  void.
  821.  
  822.  The row boundaries refer to the current row. Each row between the first and
  823.  last minus stepwidth may become current row, if you select that range.
  824.  
  825.  Example:
  826.  
  827.          #func 1 f(u1,u2,i1,i2):=(u2-u1)*(i2-i1)
  828.          #contract 5 0 0 2 1 3 4
  829.  
  830.  Writes the product of the differences of odd and even row pairs in columns
  831.  3 and 4 to column 5. As the whole range is selected any possible pair in
  832.  forward sequence will be processed. The first two entries in column 5 will
  833.  be marked void.
  834.  
  835.  See also `func`, `generate` and `delta`.
  836.  
  837. 3 count
  838.  Fills a column with the current row number. An optional function as defined
  839.  by a `func` command may follow. In the latter case the column will hold the
  840.  results of the given function, which is passed the row number as its
  841.  argument.
  842.  
  843.  Example:
  844.  
  845.          #func 1 f(x):=10x+3
  846.  
  847.          #count 1
  848.          #count 2 1
  849.  
  850.  The first command stores the row number to column 1. The second stores the
  851.  row number multiplied by 10 incremented 3 to column 2.
  852.  
  853.  See also `func`, `make` and `scale`.
  854.  
  855. 3 define
  856.  Defines a global variable. Global variables may replace `any token` that
  857.  expects numbers. No matter if it be column numbers, function numbers, row
  858.  boundaries, etc. They however aren't related in any way to the math
  859.  processor's variables and thus cannot be used in mathematical contexts.
  860.  
  861.  The syntax is variable name followed by value. Example:
  862.  
  863.          #define MyVar 6
  864.  
  865.  `MyVar` may now replace any number `token` with the value 6. For instance:
  866.  
  867.          #lreg 1 2 3 myvar
  868.  
  869.  would do a linear regression of column 2 to 1 weighted by 3, beginning with
  870.  row myvar -- which we defined to be 6. As you probably guess from that,
  871.  global variables -- being `system tokens` -- are not case sensitive.
  872.  
  873.  See also `undefine`, `queue` and `mark`.
  874.  
  875. 3 delta
  876.  Works similar to `contract` with the function f(x,y):=y-x as the inbuilt,
  877.  eternal and unchangeable default. Thus the function `token` is missing.
  878.  The first `token` holds the column to generate. The next `token` holds the
  879.  `column` to take the `data` from. If the next `token` holds a '-' sign,
  880.  the function result is negated, resulting in f(x,y):=x-y. If this `token`
  881.  does not hold a '-' it is directly interpreted as the next one, which holds
  882.  the start row and the next the end row. As usual empty or zero tokens mean
  883.  boundary values that is first or last row. The first entry in the
  884.  destination column is marked void.
  885.  
  886.  See also `contract`.
  887.  
  888. 3 diff
  889.  Computes the average difference of the entries in a column in a better and
  890.  faster way then a combined `delta` and `average`. It uses the so called
  891.  "far differences method" which produces much better results than the above,
  892.  if you have more than 6 items. The item count however must be even or the
  893.  last item will be ignored.
  894.  
  895.  The first `token` holds the column to process and the second may optionally
  896.  hold a weight column. By now the latter is simply averaged to compute a mean
  897.  error, which is in turn stored to DPSMX. The mean itself is posted on screen
  898.  and of course stored to the global maths variable DPMX.
  899.  
  900.  Example:
  901.  
  902.          #diff 3
  903.          ! Wavelength
  904.          #post 2DPMX
  905.  
  906.  Suppose column 3 holds the coordinates where zero amplitudes of a standing
  907.  wave have been encountered. `diff` computes the average difference between
  908.  those coordinates that is half the wavelength. The `post` command doubles it
  909.  and puts the result on screen.
  910.  
  911.  See also `average`, `delta` and `post`.
  912.  
  913. 3 digital
  914.  Sets the `precision` fixed to the decimal point for the column. The argument
  915.  is the decadic exponent of the last significant cypher.
  916.  
  917.  Example:
  918.          #digital 2 -2
  919.          #digital 3  1
  920.  
  921.  will cause the number 123.456 to appear as 123.46 in column 2 and as 120 in
  922.  column 3.
  923.  
  924.  Beyond that a minimum error is computed for that column which is used in
  925.  averaging, etc. when no error column is specified to avoid meaningless
  926.  results.
  927.  
  928.  See also `prec` and `average`.
  929.  
  930. 3 dos
  931.  This command passes whatever it is followed by to the operating system's
  932.  command processor.
  933.  
  934.  Example:
  935.  
  936.        #term gnuplot
  937.        #write "MyPlot.dta" "MyPlot.gnu"
  938.        #dos gnuplot MyPlot.gnu
  939.  
  940.  will imediately plot your results.
  941.  
  942. 3 dsize
  943.  Sets the maximum number of rows that all columns of the table may hold. This
  944.  command should preceed the `columns` command.
  945.  
  946.  If no `dsize` command preceeds the `columns` command, `columns` will default
  947.  the table size to 10 rows. If a table exceeds the given size, DataProc will
  948.  try to enlarge it, by either doubling the current size or adding 100 rows,
  949.  whatever is smaller. Note that this might cause memory fragmentation and
  950.  takes some time, if you have a lot of columns. So if you encouter memory
  951.  problems, try to specify a tight -- but sufficient -- `dsize`.
  952.  
  953.  `dsize` may now appear anywhere in the commandfile. Note that in previous
  954.  releases this might have caused severe crashes. Anyhow, you cannot shrink
  955.  tables. If you specify a size smaller than the current size, `dsize` will
  956.  be ignored. If you want to save memory during runtime shrinking a table,
  957.  you must `reset`.
  958.  
  959.  Example:
  960.  
  961.          #dsize 40
  962.  
  963.  Sets the maximum number of rows in the data file to 40.
  964.  
  965.  See also `columns` and `reset`.
  966.  
  967. 3 else
  968.  Will switch to the other condition of an `if` statement. If the last
  969.  `if` already encountered an `else`, it will cancel this `if` and
  970.  `else` refers to the previous nesting level.
  971.  
  972.  See also `if`, `endif` and `ask`.
  973.  
  974. 3 endif
  975.  Cancelles an `if` nesting level and returns to non conditional execution.
  976.  
  977.  See also `if` and `else`.
  978.  
  979. 3 exit
  980.  Causes DataProc to terminate immediately. Any further data either in
  981.  the current or the parental file or files will be ignored.
  982.  
  983.  See also `quit`.
  984.  
  985. 3 flushset
  986.  Annihilates all assignments to terminal enviroment variables done by
  987.  `storeset` at one time.
  988.  
  989.  Example:
  990.  
  991.        ; adapt to german language and EEPIC output
  992.        #include deutEEP
  993.        ; do something
  994.        ; prepare output for a doubly logarithmic regression
  995.        #term latex
  996.        #storeset aID Exponent
  997.        ; produce some output
  998.        ; and return to the "deutEEP" settings
  999.        #flushset
  1000.  
  1001.  See also `storeset`, `set` and `reset`.
  1002.  
  1003. 3 flushvar
  1004.  This function clears all global constants. I'm not sure, if you might have
  1005.  need for it, because `reset` does this as well, but if you should, here it
  1006.  is.
  1007.  
  1008.  See also `reset`.
  1009.  
  1010. 3 func
  1011.  The next `token` numbers a function that is explained in the rest of the line
  1012.  to the maths processor. By this number `make`, `count` and `scale` reference
  1013.  their functions. Note that since 1.231 you may place an undefined global
  1014.  variable instead of a defined number token. DataProc will seek for an empty
  1015.  slot and define the global with the number it assigned the function.
  1016.  
  1017.  The name of the arguments are arbitrary, but the sequence left to right
  1018.  corresponds to the left to right sequence how `make` passes the cell values
  1019.  of its designated argument columns.
  1020.  
  1021.  Example:
  1022.  
  1023.          #func 4 c(a,b):=a/b
  1024.          #func 5 errc(a,b,sa,sb,c):=c*sqrt((sa/a)^2+(sb/b)^2)
  1025.  
  1026.  Computes a value c as the quotient of a and b and its error by the Gauss
  1027.  error propagation for potency expressions. The `make` command my look as
  1028.  follows:
  1029.  
  1030.          #make 5 4 1 3
  1031.          #make 6 5 1 2 3 4 5
  1032.  
  1033.  This would expect a to be in column 1, its error in 2, b in 3, its error
  1034.  in 4 and would generate the quotient c to column 5 and its error to 6.
  1035.  
  1036.  See also `make`, `count`, `scale`, `generate` and `math`.
  1037.  
  1038. 3 generate
  1039.  This command is similar to `make`. The difference is that it does not
  1040.  execute during the `data` read, but it does generate a new column immediately
  1041.  from the already read table.
  1042.  
  1043.  The syntax differs a little from `make`. The first `token` holds the column
  1044.  number to generate. The next two tokens hold the start and end row to
  1045.  process. Empty tokens or zeroes are interpreted as boundary values, meaning
  1046.  first and last row. The next token holds the function number. The value -1
  1047.  calls the inbuilt function that results with the row number. The following
  1048.  tokens are just as `make` the function arguments.
  1049.  
  1050.  Example:
  1051.  
  1052.          well we read some data to column 1 and 2 ...
  1053.  
  1054.          #lreg 1 2
  1055.          #func 1 delta(x,y):=abs(y-DPA*x-DPB)
  1056.          #generate 3 0 0 8 1 2
  1057.  
  1058.  Column 3 will then hold the absolute difference to the mean straight line.
  1059.  
  1060.  See also `make`, `columns` and `func`.
  1061.  
  1062. 3 globtitle
  1063.  globtitle sets a global title to the whole table. The next `token` is
  1064.  interpreted as a string which is used to name the table. See the
  1065.  `terminal` section for more information about titles.
  1066.  
  1067.  See also `title`.
  1068.  
  1069. 3 group
  1070.  The first `token` is expected to hold a group number. If the group number is
  1071.  new, a new group is allocated. The following tokens hold a list of columns
  1072.  to add to the group. You cannot shrink a group by now.
  1073.  
  1074.  Grouping is mainly a formatting advise for the `terminal` driver. Table
  1075.  drivers for instance should equip groups with a common title as specified
  1076.  by the `name` command.
  1077.  
  1078.  Example:
  1079.          #group 1 5 6
  1080.          #group 1 7
  1081.          #group 1 6
  1082.  
  1083.  The first command allocates the group 1 and specifies the columns 5 and 6 as
  1084.  its members. The second command adds column 7 to the same group that now
  1085.  holds the columns 5, 6 and 7. As column 6 is already in the group the third
  1086.  command is ignored.
  1087.  
  1088.  See also `globtitle`, `title` and `name`.
  1089.  
  1090. 3 gtitle
  1091.  Sets a secondary title to a column. Works just as `title`, but the argument
  1092.  string is stored to a different place. This title should be used to e.g.
  1093.  name the points in a plot. See the `terminal` section for more information
  1094.  about titles.
  1095.  
  1096.  Example:
  1097.  
  1098.          #gtitle 2 "Counter rates"
  1099.  
  1100.  Sets the gtitle to "Counter rates". The gnuplot terminal will thus name the
  1101.  data plot "Counter rates".
  1102.  
  1103.  See also `title` and `rtitle`.
  1104.  
  1105. 3 if
  1106.  Initiates a conditional block of statements. The rest of the line is passed
  1107.  to the maths processor and the result is checked. Any value greater than
  1108.  zero denotes TRUE, zero or less FALSE.
  1109.  
  1110.  If FALSE, control will not execute any command until `else` or `endif` is
  1111.  encountered.
  1112.  
  1113.  If TRUE, control will continue execution until `else` is encountered. In
  1114.  that case the block will be skipped until `endif` appeares. `else` is of
  1115.  course not obligatory.
  1116.  
  1117.  See also `else`, `endif` and `ask`.
  1118.  
  1119. 3 include
  1120.  The following `token` is the filename to include. If the file does not open,
  1121.  DataProc retries filename.tst and if that fails, too, it issues a "File does
  1122.  not exits" error. The include file is expected to be a `commandfile`, just
  1123.  like the one calling for `include`. This is especially handy, if you e.g.
  1124.  create your data automatically and have to process them just the same
  1125.  every time. So you would write a commandfile inputting theese data. Another
  1126.  extremely practical usage is to create a datafile by the current script
  1127.  and reread the preprocessed data after resetting the table to the same
  1128.  script. Well, possibilities seem infinite.
  1129.  
  1130.  Whatever is in the file is handeled as if it were part of the original file.
  1131.  You may nest `include` as deep you will. As the algorithm is recursive you
  1132.  may be well advised to increase stack for extremely deep include nests. On
  1133.  other machines like MS-DOS you might have to increase the FILES entry in
  1134.  your config.sys, but DataProc's concept has no problem with deep nesting.
  1135.  
  1136.  You should however ensure, that you do not create include loops, meaning a
  1137.  subfile including one of its parentals. DataProc doesn't check that and will
  1138.  crash sooner or later, because of stack leakage or other system odds.
  1139.  Depending on the runtime system of the compiler it might even leave files
  1140.  open, what may have severe consequences to your filesystem. On some systems
  1141.  the medium will become unreadable and will have to be reformatted!!!
  1142.  
  1143. 3 leave
  1144.  Works similar to `slip` but marks the column to permanently hold misresults
  1145.  until a `take` command disables `leave`. This command is used to exclude
  1146.  groups of results from a regression, e.g. a non linear area.
  1147.  
  1148.  The argument `token` holds the column number to mark as misresults. If the
  1149.  column number zero is specified `leave` marks all read columns as misresults.
  1150.  Note the the column number refers to the logical read column as assigned by
  1151.  `using`.
  1152.  
  1153.  Anything that is gained by further processes of a marked entry (e.g. by
  1154.  `make` or `generate`) is also marked.
  1155.  
  1156.  See also `make`, `using`, `columns`, `slip` and `take`.
  1157.  
  1158. 3 logline
  1159.  Whatever follows the command will be written to the current logfile. If no
  1160.  logfile is opened, the command will be ignored.
  1161.  
  1162.  Example:
  1163.  
  1164.        #newlog "Important.log"
  1165.        #logline Now comes the most important thing ever!
  1166.  
  1167.  Will open a new file called "Important.log" overwriting existing an existing
  1168.  file and write "Now comes the most important thing ever!" to it.
  1169.  
  1170.  See also `applog`, `logpost` and `newlog`.
  1171.  
  1172. 3 logpost
  1173.  Works exactly like `post`, but redirects its output to the current logfile.
  1174.  If you did not open any logfile, the command is ignored.
  1175.  
  1176.  See also `applog`, `logline`, `newlog` and `post`.
  1177.  
  1178. 3 logreg
  1179.  Works just like `lreg`, but the first `token` is interpreted as a regression
  1180.  mode. Specifying zero makes this command equivalent to `lreg`. One causes
  1181.  logarithmic scaling on the x-axis, two on the y-axis and 3 on both.
  1182.  
  1183.  This command uses the decadic logarithm. The results that are posted to the
  1184.  terminal and set to DPA, DPB, DPSA, DPSB and DPR are the parameters of the
  1185.  straight line. It is the user's task and the task of the `terminal` drivers
  1186.  to interpret theese results correctly.
  1187.  
  1188.  For more information see `lreg`.
  1189.  
  1190. 3 lreg
  1191.  Starts a linear regression. The arguments are: x-column, y-column, y-weight,
  1192.  startrow and endrow. Only the first two cannot be omitted. An empty or zero
  1193.  startrow or endrow sets this value to firstrow or lastrow.
  1194.  
  1195.  If a weight column is specified a weighted regression will be done. If not,
  1196.  well DataProc does a simple regression.
  1197.  
  1198.  The regression results are hooked to the y-column. Output terminals may care
  1199.  to output them when outputting the y-column. See the `terminal` section for
  1200.  more information.
  1201.  
  1202.  Beyond that the variable DPA, DPB, DPSA, DPSB and DPR of the math processor
  1203.  are set to the regression results. Where DPA holds ascend of the regression
  1204.  straight line, DPSA its error, DPB the y-offset and DPSB the error of the
  1205.  latter and DPR the correlation ratio.
  1206.  
  1207.  Regression results are monitored to 'stdout' (usually the screen) during
  1208.  execution of the `commandfile`.
  1209.  
  1210.  Example:
  1211.  
  1212.          #lreg 1 3//8 0
  1213.  
  1214.  Does an unweighted linear regression of column 3 against column 1 beginning
  1215.  with row number 8.
  1216.  
  1217.  See also `logreg`, `areg`, `average`, `math` and `post`.
  1218.  
  1219. 3 make
  1220.  This command specifies a function to generate an entry in a column from a
  1221.  number of  entries in other columns. All entries belong to the same row.
  1222.  Note that `make` won't overwrite valid data. If you want it to, use `void`
  1223.  to mark it invalid.
  1224.  
  1225.  The first `token` designates the column to generate, the second the function
  1226.  number to use (see `func` for more info) and the following tokens are the
  1227.  column numbers which the function arguments are to be taken from.
  1228.  
  1229.  Example:
  1230.  
  1231.          #make 3 1 4 5
  1232.  
  1233.  generates the entries of column 3 using the function 1 passing it the
  1234.  contents of columns 4 and 5 as arguments each row. The whole thing might
  1235.  look as follows:
  1236.  
  1237.          #func 1 f(x,y):=x+y
  1238.          #using 4 5
  1239.          #make 3 1 4 5
  1240.  
  1241.  would read the data in the file to columns 4 and 5 and would store their
  1242.  sum in column 3.
  1243.  
  1244.  The sequence of the `make` commands is irrelevant. Before execution they
  1245.  are sorted as necessary that all columns hold valid data before being
  1246.  passed as arguments. An error will be issued, if that is not possible.
  1247.  
  1248.  See also `func`, `count`, `generate`, `scale`, `undo` and `void`.
  1249.  
  1250. 3 mark
  1251.  This command is used to `define` a global variable to the current row number.
  1252.  It is helpful to make row boundaries easier -- you don't have to count
  1253.  anymore -- and more transparent. The only argument is the name of the variable
  1254.  to define. Note that you cannot redefine variables. Use `undefine` to free
  1255.  them first.
  1256.  
  1257.  Example:
  1258.  
  1259.          some data here ...
  1260.  
  1261.          #mark RegStart
  1262.  
  1263.          some data there ...
  1264.  
  1265.          #mark RegEnd
  1266.  
  1267.          and there may be still some ...
  1268.  
  1269.          #lreg 1 2//RegStart RegEnd
  1270.  
  1271.  This would cause `lreg` to do an unweighted regression of column 2 to 1
  1272.  beginning with the data set following the #mark RegStart and ending with
  1273.  the data set following #mark RegEnd -- both inclusive.
  1274.  
  1275.  See also `define`, `undefine` and `queue`.
  1276.  
  1277. 3 math
  1278.  Whatever follows this command is directly passed to the maths processor.
  1279.  You will usually use it to compute results from regression data and use
  1280.  them as constants in new functions or `post` them on screen.
  1281.  
  1282.  Example:
  1283.  
  1284.          #title 1 diameter
  1285.          #unit 1 cm
  1286.          #digital 1 -2
  1287.          #using 1
  1288.  
  1289.          then some data follows
  1290.  
  1291.          #average 1
  1292.  
  1293.          #math l:=mx*pi
  1294.          #math sl:=smx*pi
  1295.  
  1296.          ! The average length of the peripherial is
  1297.          #post l
  1298.          ! with an average error of
  1299.          #post sl
  1300.  
  1301.  Well, that speaks for itself, doesn't it?
  1302.  
  1303.  See also `func` and `post`.
  1304.  
  1305. 3 mean
  1306.  Works similar to `make`, but you cannot choose an arbitrary function. As
  1307.  with `make` the first `token` holds the destination `column`. The next
  1308.  tokens hold a list of source columns. The entries of the destination
  1309.  columns are filled with the mean of the source columns during the `data`
  1310.  reading procedure.
  1311.  
  1312.  You can reference the error of the mean using the `smean` command.
  1313.  
  1314.  Example:
  1315.  
  1316.          #mean 6 1 2 3 4 5
  1317.          #smean 7 6
  1318.  
  1319.  Stores the mean of columns 1 thru 5 to column 6 and the error of the mean
  1320.  to column 7.
  1321.  
  1322.  See also `smean`, `make` and `average`.
  1323.  
  1324. 3 meanof
  1325.  In many cases you need the average of a well defined set of values for
  1326.  further computation. `meanof` frees you of the task of typing it as two
  1327.  `math` lines. The syntax is pretty simple. The first token holds the
  1328.  name to store the average to, the second the name of its error, then
  1329.  a list of maths expressions must follow. Note that you must at least
  1330.  supply two expression tokens. Beyond that the total number is arbitrary.
  1331.  
  1332.  Example:
  1333.  
  1334.        #meanof mr smr r1 "2*r2" 123
  1335.  
  1336.  Will compute the average of r1, (2*r2) and 123 and store it to mr. The
  1337.  average spot check error.
  1338.  
  1339.  See also `mean` and `wmeanof`.
  1340.  
  1341. 3 merge
  1342.  Adds up to 20 columns to a data column for output purposes. This is used
  1343.  to plot more than one column's data in a single diagram by means of the
  1344.  "gnuplot" terminal driver. See the `terminal` section for more information
  1345.  of how the terminals handle merges.
  1346.  
  1347.  Example:
  1348.  
  1349.          #merge 2 5 6 7
  1350.  
  1351.          well, there might be anything
  1352.  
  1353.          #term gnuplot
  1354.          #ocol 1 2
  1355.          #write "data.dta" "data.gnu"
  1356.  
  1357.  This will produce a graph showing the behaviour of the y-data in coloumns
  1358.  2 5 6 and 7 to the x-data in column 1. Without the `merge` command only the
  1359.  data in column 2 would be taken.
  1360.  
  1361.  See also `ocol` and `write`.
  1362.  
  1363. 3 name
  1364.  This command sets a title common to a group. If you are measuring for
  1365.  example a set of parameters of a gas at different pressures, you would
  1366.  put all measuring series to a common pressure into a group and name it
  1367.  according to the pressure used.
  1368.  
  1369.  The first `token` holds the group number as specified by a `group` command.
  1370.  The second `token` holds the title for the group.
  1371.  
  1372.  Example:
  1373.  
  1374.          #group 1 1 2 3
  1375.          #group 2 4 5 6
  1376.          #group 3 7 8 9
  1377.          #name 1 "700 mbar"
  1378.          #name 2 "800 mbar"
  1379.          #name 3 "900 mbar"
  1380.  
  1381.  See also `group`, `globtitle` and `title`.
  1382.  
  1383. 3 newlog
  1384.  This command opens a file to store some scratch that you would usually
  1385.  write on some sheet for further evaluation during the formulation of
  1386.  your data analysis. If the file given with the first token already exists,
  1387.  it will be overwritten.
  1388.  
  1389.  See also `applog`, `logline` and `logpost`.
  1390.  
  1391. 3 nop
  1392.  No operation. This command does absolutely nothing and is only a kludge
  1393.  for debugging purposes.
  1394.  
  1395. 3 ocol
  1396.  This command is followed by a list of physical `column` numbers. The
  1397.  terminal output is generated from that list in the given sequence. It
  1398.  also assigns the logical write numbers of the columns. It is the pendant
  1399.  to `using` doing the same for data input.
  1400.  
  1401.  Example:
  1402.  
  1403.          #term gnuplot
  1404.          #ocol 2 9 7
  1405.          #write "data.dta" "data.gnu"
  1406.  
  1407.  This will output in sequence the columns 2, 9 and 7 to "data.dta". The
  1408.  "gnuplot" `terminal` will interpret that as x-data, y-data and y-errors
  1409.  and will thus output the corresponding command sequence to "data.gnu".
  1410.  
  1411.  See also `term`, `write` and `using`.
  1412.  
  1413. 3 post
  1414.  Whatever stands behind `post` is passed to the maths processor, unless
  1415.  the first token is found as a `global string` as defined in `build`.
  1416.  The result is then printed on screen during execution of the `commandfile`.
  1417.  
  1418.  See `math` for an example. See also `build`, `func`, `lreg` and `average`.
  1419.  
  1420. 3 preamble
  1421.  The string following this command is set in front of any terminal output
  1422.  via `write`. Internally the string is passed to an fprintf() function,
  1423.  so mind the C type character specials. If the first token is found to
  1424.  be a `global string` as defined by `build` its contents are used to
  1425.  fill the preamble.
  1426.  
  1427.  Future versions will support the printout of internal values, but this is
  1428.  not yet implemented. Even the C type formatting characters don't seem to
  1429.  work properly.
  1430.  
  1431.  Example:
  1432.  
  1433.          #term gnuplot
  1434.          #preamble 'set terminal eepic; set size 1,1.5; set output "data.gph"'
  1435.  
  1436.  These commands select the GnuPlot driver as output terminal and the preamble
  1437.  in turn inits GnuPlot to output an EEPIC data file to "data.gph" in my
  1438.  preferred size.
  1439.  
  1440.  See also `term`, `write` and `unamble`.
  1441.  
  1442. 3 prec
  1443.  Sets the precision for one column or defaults it for all columns if the column
  1444.  number 0 is passed. Precision means the number of significant cyphers to
  1445.  display. It does not affect the internal computations.
  1446.  
  1447.  Example:
  1448.  
  1449.          #prec 0 4
  1450.          #prec 1 5
  1451.  
  1452.  will at first default the precision to 4 significant cyphers for all columns
  1453.  and then define the higher precision 5 for column 1. Thus:
  1454.  
  1455.    3.0145   will result 3.0145 and in column 1: 3.0145
  1456.    3.01458  will result 3.0146 and in column 1: 3.01458  (last digit rounded)
  1457.    0.0003   will result 300e-6 and in column 1: 0.0003   (exponents are
  1458.                                                           multiples of 3)
  1459.    etc.
  1460.  
  1461.  See also `digital`.
  1462.  
  1463. 3 queue
  1464.  Defines a chain of global variables, meaning a number of those with following
  1465.  numbers. This is especially useful, if you want to name the coloumns of your
  1466.  table. The first entry is expected to hold the value of the first global
  1467.  variable in the list. This may of course also be a global variable. The
  1468.  following tokens hold an arbitrary list of global variables to `define`. Note
  1469.  that you cannot redefine variables, use `undefine` to free them first.
  1470.  
  1471.  Example:
  1472.  
  1473.          #queue 3 myvar1 myvar2 myvar3
  1474.  
  1475.  would set myvar1 to 3, myvar2 to 4 and myvar3 to 5.
  1476.  
  1477.  See also `define`, `undefine` and `mark`.
  1478.  
  1479. 3 quit
  1480.  Causes DataProc to terminate the current file. In the main commandfile
  1481.  this will terminate execution -- just like `exit`. In children files
  1482.  this will return control to the parent.
  1483.  
  1484.  See also `exit` and `include`.
  1485.  
  1486. 3 read
  1487.  Well, for all practical purposes this command became meaningless. You should
  1488.  not use it. It redefines the format of logical read columns. The syntax is
  1489.  just like the `columns` command, but the identifiers refer to the logical
  1490.  read columns and not to physical columns.
  1491.  
  1492.  See also `using` and `columns`.
  1493.  
  1494. 3 readvar
  1495.  This command enables you to define math variables during runtime. The
  1496.  first token holds the variable name, the rest of the line is posted
  1497.  to the screen and a prompt is added. Execution waits for a float number
  1498.  to be entered and will assign its value to the given variable.
  1499.  
  1500.  See also `ask` and `stop`.
  1501.  
  1502. 3 remcol
  1503.  Removes a column from the current table. `remcol` must be followed by a
  1504.  physical column number. I am not sure, if it is always save to use that
  1505.  function, but if you are in trouble with memory space, you might welcome
  1506.  this function. Anyhow, if you find crashes that may be caused by `remcol`
  1507.  report them and I will see what I can do.
  1508.  
  1509.  See also `addcol` and `columns`.
  1510.  
  1511. 3 reset
  1512.  Starts a new table and thus forgets all columns, regressions, etc. that have
  1513.  been done previously. The math processor is however not affected by reset and
  1514.  thus all variables, constants and functions are still available.
  1515.  
  1516.  reset attempts to free all the memory allocated by table private structures.
  1517.  I am not sure if it is always succesful in freeing everything. So if you
  1518.  should have memory troubles a reorganization of the `commandfile` may take
  1519.  you out of there.
  1520.  
  1521.  After processing reset the declarations for `dsize` and `columns` must be
  1522.  newly set, because the previous are forgotten and deallocated. Global
  1523.  variables are also forgotten. Terminal enviroment variables however are
  1524.  not affected by `reset`.
  1525.  
  1526.  See also `dsize`, `define`, `set` and `columns`.
  1527.  
  1528. 3 row
  1529.  Sets the row counter to the specified value. This is useful especially
  1530.  to read data for different columns from different files as well as to
  1531.  partially replace data in an already made table. Be careful using this
  1532.  command, you can easily produce "white spots" in your table. The command
  1533.  only checks that you do not exceed the maximum size as defined by the
  1534.  `dsize` command.
  1535.  
  1536.  Example:
  1537.  
  1538.        #using 1
  1539.        #include "Col1.dta"
  1540.        #row 0
  1541.        #using 2
  1542.        #include "Col2.dta"
  1543.  
  1544.  This would read column one from "Col1.dta" and later read the same rows
  1545.  but in column two from "Col2.dta".
  1546.  
  1547.  See also `using`, `include`, `void`.
  1548.  
  1549. 3 rtitle
  1550.  Sets a secondary title to a column. Works just as `title`, but the argument
  1551.  string is stored to a different place. This title should be used to e.g.
  1552.  name the regression graph in a plot. See the `terminal` section for more
  1553.  information about titles.
  1554.  
  1555.  See also `title`, `gtitle` and `runit`.
  1556.  
  1557. 3 runit
  1558.  Sets a secondary unit to a column. Works just as `unit`, but the argument
  1559.  string is stored to a different place. This title should be used for
  1560.  hybrid units like in regressions. If no `runit` is specified, the terminals
  1561.  should care to create their own hybrids. See the `terminal` section for
  1562.  more information about units.
  1563.  
  1564.  See also `unit`, `runit`, `gtitle` and `title`.
  1565.  
  1566. 3 scale
  1567.  Sets a function to scale data before storing it to the table. The function
  1568.  must expect one argument of course. `scale` expects the physical column
  1569.  number.
  1570.  
  1571.  Example:
  1572.  
  1573.          #func 1 f(x):=x/milli
  1574.          #scale 2 1
  1575.  
  1576.  For example the data unit of column 2 may be meters, but you measured
  1577.  millimeters and thus copied them to the `data` section. The `scale`
  1578.  command will care for that problem and divide all values by milli.
  1579.  
  1580. 3 set
  1581.  Sets a terminal enviroment variable. Please refer to the `terminal` section
  1582.  for the meaning of such variables to the terminals. The first `token` is
  1583.  expected to be the variable name and whatever follows will be stripped of
  1584.  leading and trailing spaces and set to the variable value, unless the first
  1585.  token is identified as a `global string` as defined by `build` what sets
  1586.  its contents.
  1587.  
  1588.  The variable is -- just as the `preamble` -- hooked on the terminal. It will
  1589.  not be affected by `reset` and each terminal holds its own set of enviroment
  1590.  variables. Thus you must first activate the terminal, you want to change the
  1591.  variable in (see `term`). `set` redefines without any warnings, unlike e.g.
  1592.  `define`.
  1593.  
  1594.  Example:
  1595.  
  1596.          #set output myfile.gph
  1597.          #set author Lars Hanke
  1598.  
  1599.  sets the enviroment variable "output" to "myfile.gph" and "author" to
  1600.  "Lars Hanke". Note that the variable name is a system token and thus not
  1601.  case sensitive.
  1602.  
  1603.  See also `unset` and `term`.
  1604.  
  1605. 3 slip
  1606.  Marks the following row of the specified column or of all columns, if column
  1607.  number 0 is given, a misresult that should not be used for regression or
  1608.  averaging. Note that anything computed from that entry e.g. by `make` or
  1609.  `generate` will bear the same mark. Also note the the `diff` command will
  1610.  ususally produce bad results, if an item is left out.
  1611.  
  1612.  The first `token` holds the `column` to affect. If zero is specified it
  1613.  affects all column `data` is read to. Other tokens are ignored. `slip` is
  1614.  only valid for one single row. It is used to mark one single misresult.
  1615.  Note that the column number refers to the logical read column as assigned
  1616.  by `using`.
  1617.  
  1618.  Example:
  1619.          3/3/1
  1620.          #slip 2
  1621.          4/9/1
  1622.          5/5/1
  1623.  
  1624.  Obviously the result should have been something like 4/4/1 and 4/9/1 will
  1625.  destroy any good regression, so this single line will not be considered by
  1626.  a later `lreg` command.
  1627.  
  1628.  See also `average`, `lreg`, `diff`, `using`, `columns`, `leave` and `take`.
  1629.  
  1630. 3 smean
  1631.  This stores the error of the last `mean` command to a new column. The first
  1632.  `token` holds the column to store the error to and the second `token` holds
  1633.  the column the `mean` was stored to. The whole thing is done during the
  1634.  `data` read procedure.
  1635.  
  1636.  See also `mean`.
  1637.  
  1638. 3 stop
  1639.  Promts the rest of the line on screen and waits for any key to be pressed.
  1640.  You should use this function to stop a screen scrolling by and watch some
  1641.  results.
  1642.  
  1643.  Note that a nonzero batch level will cause this command to always continue.
  1644.  
  1645.  See also `batch`.
  1646.  
  1647. 3 storekill
  1648.  This command is used to locally unset a terminal enviroment variable.
  1649.  The syntax and function is equivalent to `unset`, but this command is
  1650.  tracked and the variable will be restored with a call to `flushset`.
  1651.  
  1652.  See also `flushset`, `storeset` and `unset`.
  1653.  
  1654. 3 storeset
  1655.  This command is used to locally set a terminal enviroment variable. The
  1656.  syntax is exactly equal to `set`, but this command is tracked and may
  1657.  be annihilated by `flushset`. This is useful, if you preset your
  1658.  terminals with e.g. a language definition file and want to change some
  1659.  settings for a specific output.
  1660.  
  1661. 3 tagdata
  1662.  Produces a clear data entry to a tagfile. Accepts an arbitrary number of
  1663.  arguments that may be global strings or math expressions. Note that all
  1664.  arguments are tokens. The arguments are evaluated and written to the
  1665.  tagfile using the separator given in the first token. If the first token
  1666.  is longer than a single character, it will be evaluated as first data entry
  1667.  and the separator will default to '/'.
  1668.  
  1669.  Example:
  1670.  
  1671.        #tagdata & mystr 3*4 2+pi
  1672.  
  1673.  will write "(contents of mystr)&12&5.14..." to the tagfile
  1674.  
  1675.  See also `tagfile` and `tagpost`.
  1676.  
  1677. 3 tagfile
  1678.  Opens a tagfile or - if you would rather have it - only one tag. A tagfile
  1679.  is a textfile containing marks which areas belong to which source files.
  1680.  You may post an arbitrary number of lines to each tag and finally read it
  1681.  as an input file for DataProc again. As all tags are assured to start with
  1682.  a comment, DataProc won't notice them while rereading such a file.
  1683.  
  1684.  The syntax is tagfilename in the first and tagname in the second token.
  1685.  The tagname may be a global string.
  1686.  
  1687.  Calling `tagfile` automatically closes previously opened tagfiles and
  1688.  automatically appends new tags, if the given tag is not in the file. It
  1689.  also creates new tagfiles, if the given filename is not found.
  1690.  
  1691.  Example:
  1692.  
  1693.        [something computed the maths: amp amperr DPA DPSA DblDPA DblDPSA]
  1694.  
  1695.        #tagfile "MyTags" File1Results
  1696.        #build regress1 "%f/%f/%f/%f" amp amperr DPA DPSA
  1697.        #build regress2 "%f/%f/%f/%f" 2*amp 2*amperr DblDPA DblDPSA
  1698.        #tagpost regress1
  1699.        #tagpost regress2
  1700.  
  1701.  This would always maintain two data entries in the tagfile "MyTags". You
  1702.  may later reread the tagfile as input for another table. This is extremely
  1703.  useful, if you have to regress or average the results of several regressions
  1704.  or averages of different tables.
  1705.  
  1706.  See also `tagpost` and `newlog`.
  1707.  
  1708. 3 tagpost
  1709.  Works exactly like `post`, but the results are written to the current tagfile.
  1710.  If no tagfile exists, the command will be ignored.
  1711.  
  1712.  See also: `tagfile`, `post` and `logpost`.
  1713.  
  1714. 3 take
  1715.  Removes the misresult tag set by `leave` from a column or from all columns
  1716.  if column number zero is specified.
  1717.  
  1718.  The argument `token` holds the logical read column to affect.
  1719.  
  1720.  See also `leave`.
  1721.  
  1722. 3 term
  1723.  Specifies an output terminal driver. The next `token` is expected to be
  1724.  the terminal name. For more information about terminals and output see
  1725.  the `terminal` section.
  1726.  
  1727.  See also `write`.
  1728.  
  1729. 3 title
  1730.  Sets a title to a specific column. The command has standard syntax. The
  1731.  argument `token` holds the string to be used as the column's title. See
  1732.  the `terminal` section for more information about titles.
  1733.  
  1734.  Example:
  1735.  
  1736.          #title 2 Speed
  1737.  
  1738.  Sets the title "Speed" to the physical column 2.
  1739.  
  1740.  See also `gtitle`, `rtitle`, `unit` and `globtitle`
  1741.  
  1742. 3 unamble
  1743.  Deletes a `preamble` from a terminal. Just to get rid of formerly defined
  1744.  terminal initialization strings.
  1745.  
  1746.  See also `term` and `preamble`.
  1747.  
  1748. 3 undefine
  1749.  Cancelles a global variable as defined by `define`, `queue` or `mark`. It
  1750.  also frees its memory. You may pass as many variables as you like to free.
  1751.  
  1752.  Example:
  1753.  
  1754.          #undefine myvar1 myvar2 myvar3
  1755.  
  1756.  will free all the 3 variables named. If a variable is not found, `undefine`
  1757.  doesn't care.
  1758.  
  1759.  See also `define`, `queue` and `mark`.
  1760.  
  1761. 3 undo
  1762.  Removes a `make` directive from a column and thus stops its automatic
  1763.  generation. `undo` removes `mean` and `smean` directives as well.
  1764.  
  1765.  Example:
  1766.  
  1767.          #make 3 1 4 5
  1768.  
  1769.          column 3 is now generated using function 1 with columns 4 and 5
  1770.          as function arguments.
  1771.  
  1772.          #undo 3
  1773.  
  1774.          column 3 won't be generated any longer
  1775.  
  1776.  See also `make`, `mean` and `smean`.
  1777.  
  1778. 3 unit
  1779.  Set the name of the unit in the specific column. In fact this is nothing
  1780.  else than another `title`. The terminals care for a handling of the unit
  1781.  string as a unit. See the `terminal` section for more information about
  1782.  titles and units.
  1783.  
  1784.  Example:
  1785.  
  1786.          #unit 4 cm
  1787.          #unit 2 "\frac{\mbox{m}}{\mbox{s}}"
  1788.  
  1789.  Sets the unit of the physical column 4 to cm and of column 2 to a LaTeX
  1790.  style command to issue m/s.
  1791.  
  1792.  See also `title`.
  1793.  
  1794. 3 unset
  1795.  Deletes an enviroment variable as defined by `set` from a terminal. See
  1796.  `set` and the `terminal` section for more information about enviroment
  1797.  variables.
  1798.  
  1799.  `unset` may be passed an arbitrary list of enviroment variables. It will
  1800.  attempt to free all of them and won't mind, if any of them exist.
  1801.  
  1802.  Example:
  1803.  
  1804.          #unset author output
  1805.  
  1806.  will free both variables "author" and "output".
  1807.  
  1808.  See also `set` and `term`.
  1809.  
  1810. 3 using
  1811.  This command assigns the logical read column numbers. using is followed by
  1812.  a list of physical column numbers that are in turn assigned logical read
  1813.  columns in the given sequence. Columns that do not appear in the list
  1814.  will not be read.
  1815.  
  1816.  Example:
  1817.  
  1818.          #using 3 6 1
  1819.  
  1820.  will read the first data `token` into the physical column 3, the second
  1821.  `token` to column 6 and the third to column 1. Any further data tokens
  1822.  are ignored.
  1823.  
  1824.  See the `data` section for  more information about data tokens, etc.
  1825.  
  1826.  See also `columns` and `ocol`.
  1827.  
  1828. 3 void
  1829.  This command marks a block of rows in a column as invalid. The syntax is
  1830.  in sequence: column to affect, first row to mark void and last row to
  1831.  mark void, both inclusively. As the `make` command does not overwrite
  1832.  valid columns, `void` can be used to enable remakes in a second read
  1833.  pass realized by resetting the row counter using the `row` command.
  1834.  
  1835.  See also `row` and `make`.
  1836.  
  1837. 3 wmeanof
  1838.  This function fulfills the same task as `meanof` but is its weighted
  1839.  derivant. The first token holds the variable name to store the average
  1840.  to and the second the variable name to store its spot check error. These
  1841.  tokens are followed by pairs of maths expressions denoting value and their
  1842.  errors each. Note that you must at least supply two pairs -- that is
  1843.  six tokens all in all!
  1844.  
  1845.  See also `meanof`.
  1846.  
  1847. 3 write
  1848.  Followed by one to four tokens. The first `token` holds the name of the
  1849.  output file to write to. The second `token` supplies a secondary filename
  1850.  for additional information that is needed by some terminals.
  1851.  
  1852.  The last two tokens hold start and endrow, which are both included. Empty
  1853.  tokens or zeroes are interpreted as maximum values -- meaning first or
  1854.  last row.
  1855.  
  1856.  What columns are written depends on their logical write numbers. See `ocol`
  1857.  for information about assigning logical write numbers.
  1858.  
  1859.  What files are needed, how many columns may be passed and how that is
  1860.  interpreted depends on the selected `terminal`. See the `terminal` section
  1861.  for more information about that.
  1862.  
  1863.  Example:
  1864.  
  1865.          #write "data.dta" "data.gnu" 0 8
  1866.          #write "dat1.dta" //9
  1867.  
  1868.  Writes from the first row to row number 8 to "data.dta" and passes the name
  1869.  "data.gnu" for the driver file. Then outputs the rest to "dat1.dta"
  1870.  specifying no driver file.
  1871.  
  1872.  See also `ocol` and `term`.
  1873.  
  1874. 2 data
  1875.  Any line that cannot be processed as a `command`, `comment` or `post` is
  1876.  expected to hold `data`. Data lines are series of tokens. Each `token` is
  1877.  read to a logical read column as defined by `using` in the sequence of
  1878.  their occurence. An empty or missing `token` causes DataProc to copy the
  1879.  last entry again.
  1880.  
  1881.  If the first `token` for a column is read empty the default value on startup
  1882.  is void.
  1883.  
  1884.  Example:
  1885.  
  1886.          #using 1 2 3
  1887.          #math lv:=2*3.9
  1888.  
  1889.          1/2.1
  1890.          2/3.5/6
  1891.          3/4.7
  1892.          4/5.2/3
  1893.          5/6.1
  1894.          6/6.8
  1895.          7/7.2/-
  1896.          8/7.5
  1897.          9/$=lv
  1898.  
  1899.  would result in a table:
  1900.  
  1901.          1 2.1 -
  1902.          2 3.5 6
  1903.          3 4.7 6
  1904.          4 5.2 3
  1905.          5 6.1 3
  1906.          6 6.8 3
  1907.          7 7.2 -
  1908.          8 7.5 -
  1909.          9 7.8 -
  1910.  
  1911.  A `token` is marked void, if the last character is a '-' sign. That does
  1912.  however not apply to string typed data. It is also possible to read in
  1913.  variables from the maths processor as shown in the last line of the above
  1914.  example. The magical sequence '$=' causes DataProc to seek for a variable
  1915.  that is named as the rest of the `token` and put its value there. This
  1916.  feature works with double typed columns as well as with integer typed
  1917.  columns.
  1918.  
  1919. 2 terminals
  1920.  Together with the regression facilities this is the most useful and complex
  1921.  section. DataProc can issue `data` correctly formatted for a number of other
  1922.  programs. DataProc generates LaTeX tables (tabular enviroments) using the
  1923.  `latex` terminal driver, GNUPLOT data and command files using the `gnuplot`
  1924.  terminal and several other terminal e.g. `plain` which produces a printer
  1925.  output comes with this version. Read this section carefully, because some
  1926.  terminals may handle some situations absolutely different from others.
  1927.  
  1928.  All terminals support preambles, which are outputted at the beginnig of the
  1929.  secondary outputfile. If there is no secondary file for the specified
  1930.  terminal, the preamble goes to the primary. All terminals support backslash
  1931.  controls in their preambles.
  1932.  
  1933.  See also `commands write` and `commands ocol` for the definition of primary
  1934.  and secondary output files, logical write columns, etc. See `commands term`
  1935.  to select a terminal for output.
  1936.  
  1937.  Terminal names aren't case sensitive anymore, for they are system tokens.
  1938.  
  1939. 3 backslash controls
  1940.  Some `terminal enviroment variables` allow non-printable characters, or you
  1941.  may wish to set linefeeds etc. into `preambles`. Therefore you may set
  1942.  backslash control sequences. They all begin with the `backslash` '\'. The
  1943.  definitions of those sequences is similar to the C-language character
  1944.  definition. Note that by now you may set '\%' or '%' to result as a percent
  1945.  sign. Future versions may however support arguments and then '\%' will
  1946.  oblige. The characters following the backslash are not case sensitive. By now
  1947.  the following controls are supported.
  1948.  
  1949.  `\\` displays the backslash itself
  1950.  
  1951.  `\0` is compiled to a null character; ASCII code 0.
  1952.  
  1953.  `\b` is compiled to the backspace character.
  1954.  
  1955.  `\d` must be followed by exactly three decimal digits. If you've got less,
  1956.  place leading zeroes. The sequence will be compiled to the ASCII code
  1957.  represented by the decimal number.
  1958.  
  1959.  `\f` is compiled to the formfeed character. This will feed the current page
  1960.  out of a printer or on most systems clear the screen.
  1961.  
  1962.  `\n` is compiled to a linefeed character. On most systems this will not only
  1963.  feed, but also cause a carriage return.
  1964.  
  1965.  `\r` is compiled to a carriage return character.
  1966.  
  1967.  `\t` is compiled to a horizontal tabulator character.
  1968.  
  1969.  `\v` is compiled to a vertical tabulator character.
  1970.  
  1971.  `\x` must be followed by exactly two hexadecimal digits. If you've got only
  1972.  one, place a leading zero. The sequence will be compiled to the ASCII code
  1973.  represented by the hexadecimal number.
  1974.  
  1975.  `\` must be followed by exactly three octal digits. If you've got less,
  1976.  place leading zeroes. The sequence will be compiled to the ASCII code
  1977.  represented by the octal number. Note that there is `no` extra identifier
  1978.  behind the backslash.
  1979.  
  1980. 3 dump
  1981.  This terminal is used to auto-generate `include` files for DataProc itself.
  1982.  It does not do any data formatting, but the result may be read in right
  1983.  away even by the same commandfile e.g. after resetting the current table.
  1984.  The `dump` terminal takes care that information about void data or misresults
  1985.  won't get lost. It may also preserve titles and enviroment variables including
  1986.  preambles.
  1987.  
  1988. 4 enviroments
  1989.  The very few supported enviroments for `dump` are:
  1990.  
  1991.  `Global` will issue a #globtitle command to the destination to preserve the
  1992.  current table name.
  1993.  
  1994.  `NoSlip` switches off the generation of #slip commands to mark misresults.
  1995.  
  1996.  `NoTitle` switches off the generation of titelling commands. Default is to
  1997.  issue #title, #gtitle and #unit. Note that you will get misassigned titles,
  1998.  if you change the column sequence or start by using when rereading the
  1999.  table.
  2000.  
  2001.  `Seps` sets the data separator character. Usually a space is used, but you
  2002.  may feel like specifying other seperators either to generate output for
  2003.  other programs or to get along with string type columns, which are by now
  2004.  not quoted. That will change in future. Note that backslash controls are
  2005.  supported.
  2006.  
  2007.  `TermScan` scans the terminals for their enviroment settings and issues a
  2008.  command sequence that sets those variables again when reread. Rereading
  2009.  won't however cancel variables that have not been scanned, but set later
  2010.  by your commandfile.
  2011.  
  2012. 3 gnuplot
  2013.  The primary data file holds the data to plot. The secondary file will have
  2014.  a sequence of GNUPLOT commands written to. All you will still have to do
  2015.  is to start GNUPLOT, type 'load "secondary file"' and you should see your
  2016.  graphics on screen.
  2017.  
  2018.  The `gnuplot` terminal writes no more than 4 data columns. The first column
  2019.  is expected to hold the x-data and the second the y-data. If three columns
  2020.  are given the third is interpreted as y-delta error and the errorbars style
  2021.  is automatically written to the commandfile.
  2022.  
  2023.  If 4 data columns are selected, you will need the inofficial GNUPLOT 3.1 that
  2024.  was patched by me. This one supports an errorsquares style meaning x and y
  2025.  errorbars. As this is an inofficial feature the terminal output will change
  2026.  as soon as an official GNUPLOT supports x errors. Anyhow, the third column
  2027.  holds the x errors and the fourth the y errors. The errorsquares style will
  2028.  of course be automatically selected.
  2029.  
  2030.  Void data is not plotted, but misresults are plotted plain without any
  2031.  further marks. Future versions may enable you to switch that off.
  2032.  
  2033.  If an `rtitle` is specified for the y-column and a regression had been done
  2034.  to it, the regression graph is printed as well. Logarithmic regressions (See
  2035.  `commands logreg`) are considered and printed correctly, so that you will
  2036.  expect an arced graph in a linear scaled diagram. This graph is titled with
  2037.  the `rtitle` string. All regressins are memorized!
  2038.  
  2039.  The `globtitle` is set to GNUPLOT's equivalent. The column titles (See
  2040.  `commands title`) are used to title the axes and their units are put in
  2041.  square brackets. Finally the y-columns `gtitle` is used to label the
  2042.  data plot.
  2043.  
  2044.  Preambles (see `commands preamble`) are made exactly the first line of the
  2045.  GNUPLOT commandfile. You may use them to custom scale the diagram, select
  2046.  an output file for GNUPLOT and its terminal for instance. You will also
  2047.  find it useful to tell GNUPLOT about scaling the axes e.g. by
  2048.  
  2049.          #preamble "set logscale x"
  2050.  
  2051.  Grouping is not supported. But you may merge columns (see `commands merge`)
  2052.  and get multiple y-data and even regressions printed to the same x-axis.
  2053.  Note that the terminal checks, if the x-axes of the various regressions are
  2054.  compatible.
  2055.  
  2056. 4 enviroment
  2057.  Well, there is quite a lot of them for this terminal. You should be able to
  2058.  produce any 2-D-plot you like. In the following I will use the Dollar symbol
  2059.  '$' to indicate the variable's contents. In any case consult your GNUPLOT
  2060.  manual. Here they are in detail:
  2061.  
  2062.  `Angles` issues a "set angles $" to the commandfile. This is needed to switch
  2063.  between radians and degrees in `polar` plots.
  2064.  
  2065.  `AddPlot` contents are added behind a seperating comma behind the `plot`
  2066.  command in the command file. This enables you to e.g. plot a theoretical
  2067.  curve into your experimental data.
  2068.  
  2069.  `Errorbars` forces a 4 column output to be handled with `errorbars` and not
  2070.  `errorsquares`. This should always be set by users, who do not work with my
  2071.  modified GNUPLOT, unless `errorsquares` becomes GNUPLOT standard in future.
  2072.  
  2073.  `FullRange` contents will be verbally inserted at the position of ranges in
  2074.  the GNUPlot command file. Note that you have to write the square brackets!
  2075.  
  2076.  `Key` issues a "set key $" to the commandfile. This is needed to place the
  2077.  graphics key in the plot, thus to get it out of interesting regions.
  2078.  
  2079.  `Logscale` issues "set nologscale" if it is left empty. In any other case
  2080.  it issues "set logscale $". You may want to use it with `logreg` plots.
  2081.  
  2082.  `Output` issues a 'set output "$"' to the commandfile. You should use it as
  2083.  soon you are sure the plot fits your needs. It saves a lot of typing.
  2084.  
  2085.  `Polar` issues a "set polar" if set. By default "set nopolar" is issued.
  2086.  
  2087.  `Range` issues a range after the `plot` command. The brackets are generated,
  2088.  so you will only set the pure range stuff. Example:
  2089.  
  2090.          #set range 1:8
  2091.  
  2092.  will issue:
  2093.  
  2094.          plot [1:8] ...
  2095.  
  2096.  to the GNUPLOT commandfile. As you see you can only set the x-range by now,
  2097.  but if you wish, I may add a more common enviroment variable.
  2098.  
  2099.  `Size` issues a "set size $" to the commandfile. You will usually use it
  2100.  together with `output` and `term`.
  2101.  
  2102.  `Style` adds another data file plot to the `plot` command in the commandfile,
  2103.  using the style given in the variable's contents. For Example:
  2104.  
  2105.          #set style csplines
  2106.          #ocol 1 2
  2107.          #write "data.dat" "data.gnu"
  2108.  
  2109.  would issue the following `plot` command to "data.gnu":
  2110.  
  2111.          plot "data.dat", "data.dat" with csplines
  2112.  
  2113.  Note that the `csplines` style -- data interpolation by cubic splines -- is
  2114.  also a feature that doesn't come with the standard GNUPLOT, at least not by
  2115.  now (GNUPLOT 3.2). But e.g. `lines` would be applicable with standard
  2116.  GNUPLOT.
  2117.  
  2118.  `term` issues a "set terminal $" to the commandfile. You will usually use that
  2119.  together with `output`.
  2120.  
  2121.  `tex` adapts the output for TeX style GNUPLOT terminals for a better TeX
  2122.  graph formatting. You should always set this, if you intend to use the
  2123.  GNUPLOT terminals 'latex', 'pictex', 'epic' or 'eepic'.
  2124.  
  2125.  `yrange` works just like `range` but produces a range entry that affects the
  2126.  y-range only. Note that `fullrange` overrides `yrange` which in tur overrides
  2127.  `range`.
  2128.  
  2129. 3 latex
  2130.  The traditional terminal and meanwhile the most complex. At first a crude
  2131.  overview. The latex terminal produces a LaTeX tabular enviroment for output.
  2132.  This is written to the primary output file. The secondary output is ignored.
  2133.  The whole table is put into an \fbox{}. The `globtitle` is set as a
  2134.  \multicolumn{} stretching across the full table width. If it is missing, the
  2135.  field won't be generated. Then group titles are displayed (see `commands
  2136.  name`). If two or more columns of the same group are neighboured in their
  2137.  logical write numbers, no vertical seperators will be drawn between them and
  2138.  the group title will center in that \multicolumn{}.
  2139.  
  2140.  The table's head is concluded by the column `title` and `unit`, which are
  2141.  printed `title` over `unit` and each column separated by a vertical bar from
  2142.  each other. If no units at all are specified the unit line will be
  2143.  suppressed. The head is separated by a double horizontal bar from the table
  2144.  itself.
  2145.  
  2146.  Void entries are printed as '--' medium sized horizontal bars. Misresults
  2147.  are printed in italics. The numbers are formatted and rounded as to the
  2148.  precision selected in the `commandfile` (see `commands prec` and `commands
  2149.  digital`). All entries are centered. Columns and rows are seperated by
  2150.  vertical and horizontal bars.
  2151.  
  2152.  After the table has concluded, the terminal scans for regressions, averages
  2153.  and so on. If an averaging column or a regression's y-column is included in
  2154.  the logical write list, all averaging and regression done to each of those
  2155.  will be summarized and the results will be posted in new \tabular enviroments
  2156.  following the main table. Future Versions may have a feature to influence its
  2157.  style or switch it off.
  2158.  
  2159.  Regression results are printed as y-title regression type superscript and
  2160.  x-title. The superscript by now is German. The release Version will be
  2161.  freely configurable. Then the A and B values are printed with errors and
  2162.  units. The A unit is built by \frac{y-unit}{x-unit}. If the regressions were
  2163.  logarithmic, \log is set before the corresponding unit.
  2164.  
  2165.  Avaraging results are printed in a similar manner. Column title, superscript
  2166.  (German by now, will be freely configurable) in the first line. The next
  2167.  line holds \bar{x} the mean, its error and unit. The last line displys the
  2168.  standard deviation with unit after \sigma. The whole thing displays a \pm
  2169.  too much (after the standard deviation) by now, but I'll fix that until the
  2170.  release version.
  2171.  
  2172.  Finally results of 'far differences' made by `commands diff`. Just as
  2173.  averaging results, but as no standard deviation is computed there is no
  2174.  third line. The mean difference is named \bar{\triangle x}.
  2175.  
  2176. 4 enviroment
  2177.  The LaTeX terminal supports a whole lot of enviroment variables and is very
  2178.  freely configurable. Beyond that I am sure that there will still be need for
  2179.  further configuration variables.
  2180.  
  2181.  The variable `RegData`, `Mean`, `MeanID`, `Diff` and `DiffID` serve to adapt
  2182.  automessages to your native language. Other than in the old versions (1.120
  2183.  and below) the default values are now English. I recommend to write an
  2184.  `include` file for language adaption.
  2185.  
  2186.  Except for the preamble backslash controls seemed not to be necessary and
  2187.  thus are not supported by this terminal.
  2188.  
  2189.  Here are the enviroment variables in detail. As before I use the Dollar symbol
  2190.  '$' to indicate the variable contents.
  2191.  
  2192.  `aID` sets the identifier string that preceeds regression slopes. Defaults
  2193.  to "a".
  2194.  
  2195.  `bID` sets the identifier string that preceeds regression offsets. Defaults
  2196.  to "b".
  2197.  
  2198.  `Caption` produces a \caption line. You will probably use it together with
  2199.  `FloatHead`. The `globtitle` is used as caption and won't be issued anymore
  2200.  in the table itself, when `caption` is set. If `caption` holds contents they
  2201.  are used as the \label name. Example:
  2202.  
  2203.          #globtitle Tabelle
  2204.          #set caption mytab
  2205.  
  2206.  would produce an output like:
  2207.  
  2208.          \caption{\label{mytab} Tabelle}
  2209.  
  2210.  `Corr` enables the output of correlation ratios in regression data blocks.
  2211.  
  2212.  `CorrID` sets the identifier string that preceeds correlation ratios. Defaults
  2213.  to $r$.
  2214.  
  2215.  `Diff` sets the default name for "Differencing data", which is posted at the
  2216.  beginning of a block containing those data.
  2217.  
  2218.  `DiffID` sets a symbol for the differencing data, which is displayed directly
  2219.  in front of the numerical value. This string defaults to $\bar{\triangle{x}}$.
  2220.  
  2221.  `FloatHead` puts the whole table into a `table` and `center` enviroment as
  2222.  most of you will probably do anyway. Well, it saves typing.
  2223.  
  2224.  `Mean` sets the default name for "Averaging data", which is posted at the
  2225.  beginning of a block containing those data.
  2226.  
  2227.  `MeanID` sets a symbol for the averaging data, which is displayed directly
  2228.  in front of the numerical value. This string defaults to $\bar{x}$.
  2229.  
  2230.  `NoHead` inhibits the standard `tabular` header and titeling. Note that it
  2231.  does not influence `caption` or `floathead`.
  2232.  
  2233.  `NoReg` inhibits the regression data blocks which are printed following to
  2234.  the table itself.
  2235.  
  2236.  `RegData` sets the default name for "Regression data", which is posted at the
  2237.  beginning of a block containing those data.
  2238.  
  2239.  `Size` puts the table -- not the regression data blocks -- into a LaTeX
  2240.  enviroment, which receives the name of the variable's contents. You may use
  2241.  it for oversized (too wide) tables and select a smaller font for it. For
  2242.  Example:
  2243.  
  2244.          #set size scriptsize
  2245.  
  2246.  would result in the structure:
  2247.  
  2248.          optional FloatHead and Caption
  2249.  
  2250.          \begin{scriptsize}
  2251.  
  2252.          the table itself ...
  2253.  
  2254.          \end{scriptsize}
  2255.  
  2256.          regression data blocks ...
  2257.          optional FloatHead close
  2258.  
  2259.  `SuperTab` tells DataProc to use the supertabular enviroment. Note that you
  2260.  need the corresponding style file to use this enviroment. As supertabular
  2261.  can pagebreak in tables I recommend to use this option for long tables. Note
  2262.  also that I cannot place the table into an enclosing \fbox anymore and thus
  2263.  it looks a bit different, say more loosely, so for smaller tables you may
  2264.  prefer the normal tabular still. `SuperTab` inhibits `NoHead`, but that my
  2265.  change, if you request me to do it.
  2266.  
  2267. 3 plain
  2268.  This terminal was designed for a 7 bit ASCII output e.g. to a printer. You
  2269.  may in some respects however select an extended charset and I'm working on
  2270.  improving that. Beyond that I plan to write a terminal supporting graphics
  2271.  facilities of printers.
  2272.  
  2273.  The output format is similar to the `LaTeX` terminal. Please refer to that
  2274.  section for detailed information about how the table and regression blocks
  2275.  look like. As TeX does, all scaling is done automatically.
  2276.  
  2277.  Note that other than the LaTeX terminal, plain supports backslash controls.
  2278.  Backslash controls may be specified for any single character definition and
  2279.  the `slip` style initer string. Of course like all the other terminals plain
  2280.  supports those controls in its preamble.
  2281.  
  2282. 4 enviroment
  2283.  The enviroment variables differ a little from the `LaTeX` terminal and beyond
  2284.  that there are many more of them to customize your output. Indeed I would
  2285.  recommend an `include` file for your favorit settings. It may be a good idea
  2286.  to select your screen as output file for table previewing and thus have an
  2287.  `include` for your terminal as well. Now the enviroments in detail:
  2288.  
  2289.  `aID` sets the string preceeding regression slopes in the regression data
  2290.  summaries
  2291.  
  2292.  `bID` sets the string preceeding regression offsets in the regression data
  2293.  summaries
  2294.  
  2295.  `Corr` enables output of the correlation ratio in the regression summaries.
  2296.  
  2297.  `CorrID` sets the string to preceed correlation ratios. Defaults to r.
  2298.  
  2299.  `Cross` the first character of the contents defines the character to use for
  2300.  a single horizontal bar crossing a single vertical. Defaults to '+'. On
  2301.  MS-DOS systems you may try: #set cross \d197
  2302.  
  2303.  `Custom` allows you to custom scale the column widths of the table. The
  2304.  variable string is parsed for `tokens`. Each of those tokens is parsed
  2305.  for "number$width". This will set the fixed "width" to the table's
  2306.  "number" column. Note that `spacing` is added left and right to the
  2307.  column width, as well as one character for a vertical bar.
  2308.  
  2309.  `Deviation` sets the string to issue in the regression blocks in front of
  2310.  the standard deviation result, which is by now only supported by blocks
  2311.  generated by `average`. Defaults to "Deviation".
  2312.  
  2313.  `Diff` sets the string to issue in the regression blocks for titelling
  2314.  data created by `diff`. Defaults to "Difference avaraging data".
  2315.  
  2316.  `DiffID` sets the string to issue in front of the `diff` result. Defaults
  2317.  to "Mean difference".
  2318.  
  2319.  `Feed` sets the number of blank lines in front of the table. Defaults to
  2320.  zero.
  2321.  
  2322.  `HdCross` sets the character used for a single vertical bar crossing a
  2323.  double horizontal. Defaults to '|'. On MS-DOS systems you may try:
  2324.  #set hdcross \d216.
  2325.  
  2326.  `HdLine` sets the character to use for a double horizontal bar. Defaults
  2327.  to '='. On MS-DOS systems you may try: #set hdline \d205
  2328.  
  2329.  `HLine` sets the character to use for a single horizontal bar. Defaults
  2330.  to '-'. On MS-DOS systems you may try: #set hline \d196
  2331.  
  2332.  `InterFeed` issues a formfeed between the table and the regression block
  2333.  if set.
  2334.  
  2335.  `Margin` sets the number of spaces left of the table and regression blocks.
  2336.  Defaults to zero.
  2337.  
  2338.  `Mean` sets the string to issue in the regression blocks for titelling
  2339.  data created by `average`. Defaults to "Avaraging data".
  2340.  
  2341.  `MeanID` sets the string to issue in front of the `average` result. Defaults
  2342.  to "Mean".
  2343.  
  2344.  `NoReg` suppresses the output of regression blocks if set.
  2345.  
  2346.  `NoTable` suppresses the output of the table if set.
  2347.  
  2348.  `RegData` sets the string to issue in the regression blocks for titelling
  2349.  data created by `lreg` and `logreg`. Defaults to "Regression data".
  2350.  
  2351.  `Slip` allows to define a control sequece to mark misresults. The variable
  2352.  string is parsed as two `tokens`. The first one switches the slip style on,
  2353.  the second off. The string is parsed as a C-type printf() format string.
  2354.  Thus you may use e.g. "\x08" to define the ASCII control character number 8.
  2355.  As you probably know "\x" introduces a hex number, the backslash alone an
  2356.  octal number. You must write "\\" for the backslash itself and "\%" for a
  2357.  %-sign. Each of both control strings may not exceed 29 characters. The
  2358.  default is nothing.
  2359.  
  2360.  `Small` tells the terminal to omit the single horizontal bars. This lets the
  2361.  table appear more compact and reduces it to half its length. Try it out.
  2362.  
  2363.  `Spacing` sets the number of spaces to place left and right of a table entry.
  2364.  Defaults to one.
  2365.  
  2366.  `VLine` sets the character to use for a single vertical bar. Defaults to '|'.
  2367.  On MS-DOS systems #set vline \d179 is preferable.
  2368.  
  2369. 2 errors
  2370.  Well, I'm not very pleased with the error handling of neither DataProc itself
  2371.  nor the math processor. The messages of latter are well defined and need no
  2372.  further explanation, but the position marked, where the error should have
  2373.  occured, is almost arbitrary. I will think of a better error handler when I
  2374.  rewrite the math module.
  2375.  
  2376.  The error messages of DataProc itself are typical for compilers. They are not
  2377.  too definite and are usually caused by faults lines ahead. I will try to get
  2378.  the whole stuff a little more transparent in future versions. At least I will
  2379.  cite the errorline and command.
  2380.  
  2381.  But here are the massages and what they mean:
  2382.  
  2383.    Never mind -- it's a joke: well, ignore it and give me a note, if that
  2384.                               occures. The problem is a software bug.
  2385.  
  2386.    Invalid column:            the column number given is out of range. In
  2387.                               most cases you will have forgotten to define
  2388.                               the column (see `commands columns`)
  2389.  
  2390.    Unknown command:           tells you that the `command` is unknown. You
  2391.                               will supposedly have mispelled it.
  2392.  
  2393.    Invalid function:          the function number given was never defined
  2394.  
  2395.    $ -> File "$" does not
  2396.    open:                      the named file cannot be opened, because of the
  2397.                               numbered operating system error.
  2398.  
  2399.    Invalid terminal:          the named terminal is not found in the terminal
  2400.                               list. You will probably have mispelled it.
  2401.  
  2402.    Low memory space:          well, buy some RAM to cope with that.
  2403.  
  2404.    Invalid mathematical
  2405.    expression:                should be followed by the message produced by
  2406.                               the math processor. See my words above of how
  2407.                               I think about those.
  2408.  
  2409.    Invalid format descriptor: e.g. in `columns` you specified a column format
  2410.                               other than %d, %f, %lf, %s
  2411.  
  2412.    No data for regression:    In most cases that will mean that the y-column
  2413.                               or the wheigt columns are invalid. If they are
  2414.                               O.K. check your memory and if that isn't low
  2415.                               report it to me, because that may be a bug.
  2416.                               This of course applies to `average` and `diff`
  2417.                               as well.
  2418.  
  2419.    Invalid group:             the group number given was never defined. Define
  2420.                               the group or correct the number.
  2421.  
  2422.    This should not appear:    well, it's exactly that. There is certainly a
  2423.                               software bug.
  2424.  
  2425.    Did not expect data here:  should never appear. If so, give me a note.
  2426.  
  2427.    Cannot add number tag:     a global constant cannot be set, because either
  2428.                               the variable already exists or there is no memory
  2429.                               available to store it.
  2430.  
  2431.    Unknown number tag:        a number was represented by an unknown global
  2432.                               constant
  2433.  
  2434.    Global constant expected:  in a #define statement (or similar) an obligatory
  2435.                               name of a global variable is missing
  2436.  
  2437.    Terminal enviroment
  2438.    variable expected:         in a #set or #unset command the variable key is
  2439.                               missing
  2440.  
  2441.    Terminal enviroment
  2442.    variable not parseable:    you will have mispelled backslash controls in an
  2443.                               enviroment or preamble. Not that the error is
  2444.                               issued by the terminal and thus won't appear
  2445.                               when the definition was made.
  2446.  
  2447.    Table size exceeded,
  2448.    enlarge #dsize:            should no longer appear
  2449.  
  2450.    Column already exists:     The column you want to add with #addcol is already
  2451.                               part of the table
  2452.  
  2453.    Global string $ is not
  2454.    parsable:                  The named global string cannot be evaluated. Check
  2455.                               your backslash syntax
  2456.  
  2457.    The string $ is too long:  A given string is longer than the field it should
  2458.                               be written to.
  2459.  
  2460.    DOS command "$" failed:    The command you passed to #dos caused an error
  2461.                               during execution
  2462.  
  2463.    No more #IF opened:        You called #else or #endif, but you did not
  2464.                               specify a corresponding #if.
  2465.  
  2466.    #IF at line $ is not
  2467.    closed:                    You exit a commandfile with an #IF command that
  2468.                               was not terminated by #ENDIF
  2469.  
  2470.    Identifier expected:       The command assigns a value to some symbolic
  2471.                               constant, but its name is missing.
  2472.  
  2473.    Obligeous argument
  2474.    missing:                   An argument that must be supplied is missing. Only
  2475.                               very few functions generate this error. By now it
  2476.                               is only #meanof and #wmeanof
  2477.  
  2478.    $ writing file "$":        the numbered operation system error occured during
  2479.                               output to the named file.
  2480.  
  2481.    $ clearing file "$":       the numbered operation system error occured when
  2482.                               flushing the buffers of the named file.
  2483.  
  2484.    $ closing file "$":        the numbered operation system error occured when
  2485.                               closing the named file.
  2486.  
  2487.    $ working on file "$":     the numbered operation system error occured during
  2488.                               non-I/O operations in the named file.
  2489.  
  2490. 2 History
  2491.  Some words on history. The internals of DataProc have been severly tested
  2492.  during my physics practice and should work fine, but without any kind of
  2493.  user friendliness. That were the revisions 1.0 to approximately 1.100. The
  2494.  rest was spent on more abstract commandfiles and more flexible terminals
  2495.  resulting in such as global variables, terminal enviroments and the removal
  2496.  of case sensitivity. Performance has increased a little as well, although
  2497.  I did not really optimize anything by now. The first version fulfilling
  2498.  (hopefully!) this manual is 1.144. As the manual developed from 1.120 there
  2499.  might still be some ancient remarks in it. Ignore them, if you find more
  2500.  comfortable remarks somewhere else in this manual.
  2501.  
  2502.  I added the `areg` command in revision 1.145, but as I already feared, the
  2503.  math processor is much too instable and too slow for it. I tried to fit the
  2504.  results of a slit experiment to a sinc-function. Using the same data in a
  2505.  hardcoded program with the same subroutine worked fine, but the results of
  2506.  DataProc are unusable and seem to be slightly divergent. So be very careful
  2507.  using the `areg` command. This will -- has to -- improve with the new maths
  2508.  processor.
  2509.  
  2510.  SAS/C (tm) V6.0 arrived and I recompiled the old stuff. According to new
  2511.  compiler warnings I found some errors in the code. Also I removed some bugs
  2512.  in the `plain` terminal and made the `GNUPLOT` terminal useable without
  2513.  TeX. I fitted the code for compilation on an IBM PC, detecting another set
  2514.  of buggy code sequences. Finally I ran the standard Amiga test, meaning
  2515.  MungWall and Enforcer and removed DataProc's Enforcer hits. Revision 1.153
  2516.  is the product of all those internal bugfixes. DataProc became about 7 kB
  2517.  longer but considerably faster.
  2518.  
  2519.  Well, the first release should be DataProc 2.0, but I lacked of testers and
  2520.  as it all works fine so far, I don't think it to be a big fault to release
  2521.  Version 1.153 already.
  2522.  
  2523.  Version 1.154 fixed the end vbar of the unit title line of the `plain` terminal.
  2524.  
  2525.  Version 1.156 is almost the same code -- apart from a fix of the sgn() function,
  2526.  but as I gained confidence in the code I set the optimize flags for the compiler
  2527.  and DataProc shrinked about 12 kB and increased a great deal in speed.
  2528.  
  2529.  Version 1.157 now supplies the `AddPlot` enviroment variable in the `GNUPLOT`
  2530.  terminal to add theoretical functions to experimental data.
  2531.  
  2532.  Version 1.162 supplies the `global string` feature and a slightly enhanced
  2533.  error report feature. The latter will be one of the major concerns in future.
  2534.  
  2535.  Version 1.167 fixes the boundary bug. Previous versions needed the upper
  2536.  boundary to be set one higher than told in this manual, namely the first
  2537.  excluded row. This bug is now fixed.
  2538.  
  2539.  Version 1.169 introduces the enviroment variable `small` in the `plain`
  2540.  terminal and fixes a disgusting bug in the `digital` type formatting of
  2541.  output. It still does not work how it should, but it at least should not
  2542.  produce wrong results anymore. As soon as I'll find some time I'll rewrite
  2543.  that routine to ultimately fix that problem.
  2544.  
  2545.  Version 1.174 is the promised `digital` fix. The new code might be slightly
  2546.  slower, because it now uses floating point maths, but it has a crucial
  2547.  difference. It has a chance to work and the first tests seemed very
  2548.  positive. Beyond that the new modules have been compiled with SAS/C 6.1
  2549.  resulting in even more effective code.
  2550.  
  2551.  Version 1.177 is the answer to the reported rounding problems. Why hadn't
  2552.  such severe problems been reported before? The trimming routines are now
  2553.  completely rewritten and should be stable by now. Anyhow, there might still
  2554.  be special cases that I didn't consider, so check the new routines carefully.
  2555.  The behaviour has changed a little. Selecting a precision of 4 cyphers will
  2556.  always result in a display of 4 significant cyphers, even if the last ones
  2557.  are zeroes! Rounding should do fine now.
  2558.  
  2559.  Version 1.178 adds the `runit` command and some smaller enhancements in
  2560.  configurability.
  2561.  
  2562.  Version 1.182 supports the LaTeX `supertabular` enviroment for LaTeX style
  2563.  tables.
  2564.  
  2565.  Version 1.187 now computes correlation ratios for linear and logarithmic
  2566.  regressions, can monitor them to stdout, set them to math variables and
  2567.  of course output them to the relevant terminals. Finally I found an Amiga
  2568.  specific bug in the stdout management. Here's to you, Tim, now your stdout
  2569.  will be sorted, finally!
  2570.  
  2571.  Version 1.189 is the answer to a set of guys using this software extensively
  2572.  but don't even think of paying for it. Well, this version is equipped with
  2573.  a keyfile. It runs perfectly without a keyfile, if you got strong nerves,
  2574.  but a valid keyfile will switch off those nasty intermezzos!? Well, see and
  2575.  enjoy!
  2576.  
  2577.  Version 1.202 is nothing but the (almost) perfection of the shareware
  2578.  reminders. You will notice, what it is, while using it. Never mind, pay!
  2579.  
  2580.  Just coming back from porting DataProc to MS-DOS. Finally it seems to run
  2581.  fine as I thought of carrying my test files with me. I fixed a possible
  2582.  bug in the maths processor that the compiler complained about. The handling
  2583.  of the Keyfile changed a bit, because fseek() doesn't seem to work how it
  2584.  should. In the end the MS-DOS users are the lucky guys, cause the most
  2585.  nasty shareware reminder during the execution does not work. Don't be too
  2586.  happy, but sure that I'll fix that. Version 1.203 is nothing but the
  2587.  recompiled port sources.
  2588.  
  2589.  Version 1.205 no longer requires the number token in the `columns` command.
  2590.  Beyond that a bug in `columns` had been fixed allowing you to omit the
  2591.  `using` command from your scripts. By default `DataProc` will read all
  2592.  columns in the given sequence now.
  2593.  
  2594.  Version 1.213 now allows to read several columns later. See the command
  2595.  `row` that has been added. Beyond that `quit` and `execute` are new and
  2596.  prepare an interactive mode. Finally a bug in the plain terminal has been
  2597.  fixed. Well, I had some severe crashes, but I couldn't track them down to
  2598.  DataProc. Two hours of constant testing with Enforcer and MungWall didn't
  2599.  produce any hit ... so I tend to blame it on some other task. Anyhow, if
  2600.  you encounter crashes, report them immediately and tell me what other tasks
  2601.  are running, libraries installed, etc.
  2602.  
  2603.  Version 1.214 is the product of two sleepless nights of debugging and
  2604.  the `internal` version now owns a 40kB sized cross debugger. I will now
  2605.  go to sleep telling you ... there ain't no more crashes! Ahh, before I
  2606.  forget to mention it, there had been a display format bug with void data
  2607.  in the plain terminal, this had been fixed during the last two nights as
  2608.  well.
  2609.  
  2610.  Version 1.221 has the interactive mode added. See documentation for
  2611.  special information.
  2612.  
  2613.  Version 1.225 is a bugfix compendium. First a bug I most likely have
  2614.  implemented myself in 1.213 that prohibited DataProc from making columns,
  2615.  which have already been generated by #make, is fixed. Then a typo in the
  2616.  GnuPlot terminal was also fixed. And finally an annoying and heavy bug
  2617.  in logscaled regression is removed. Note that any results you got from
  2618.  logarithmic actions like #logreg used the natural logarithm and NOT the
  2619.  decadic as mentioned in the manual. By now this is fixed. Finally weighted
  2620.  logarithmic actions had been pure nonsense, this is fixed as well.
  2621.  
  2622.  Version 1.227 fixed another typo in the GnuPlot terminal. Logarithmic plots
  2623.  should now be perfect.
  2624.  
  2625.  Version 1.228 fixed the `polar` enviroment in the gnuplot terminal. It now
  2626.  works as it should.
  2627.  
  2628.  Version 1.233 is another contribution to user friendliness. First you may
  2629.  specify undefined global variables as function numbers in the `func` command
  2630.  which will then automatically initialized, second the `dsize` command is
  2631.  far less critical than before. See the commands' section for details.
  2632.  
  2633.  Version 1.234 added the `addcol` and `remcol` commands. For all practical
  2634.  purposes they are obsolete, but you may think them as a contribution to
  2635.  the beauty of commandfiles. As I lack of time I had no time to test the
  2636.  routines, but for all thats logic `addcol` has to run and `remcol` at least
  2637.  should do.
  2638.  
  2639.  Version 1.235 is the recompile of the 1.234 MS-DOS port on the Amiga machine.
  2640.  The sources are now assured to be identical.
  2641.  
  2642.  Version 1.236 is the product of half an hour using the program myself. For
  2643.  what do I have testers, if they don't even notice severe uncomfortabilities?
  2644.  The GnuPlot terminal now supports a `yrange` enviroment. The LaTeX terminal's
  2645.  regression slope and offset identifiers are now configurable. Titles may now
  2646.  be fed with global strings. Finally you may now open a logfile to store
  2647.  additional information you may need while while writing down your results.
  2648.  
  2649.  Version 1.238 fixes a handful of bugs I found in the same half hour. As
  2650.  nobody complained, I assume nobody uses the features added since 1.100.
  2651.  
  2652.  Version 1.239 adds the precision feature to the `build` command's float
  2653.  conversion.
  2654.  
  2655.  Version 1.241 fixes a bug that came in with the titles taking global strings
  2656.  and an old bug in `mark`. `mark` now really works as described in this manual,
  2657.  but it returned a one too small number in older versions.
  2658.  
  2659.  Version 1.246 adds the tagfile support and the `dos` command.
  2660.  
  2661.  Version 1.247 adds the `if` clause and a lot of interactive stuff. See `ask`,
  2662.  `else`, `endif`, `if`, `readvar` and `stop` for more information. Tagfile
  2663.  support was enhanced by `tagdata`.
  2664.  
  2665.  Version 1.249 adds the enhanced batch support commands `storeset`, `flushset`
  2666.  and `flushvar`. The online statisic commands `meanof` and `wmeanof` and
  2667.  finally the plain terminal, too, supports the `aID` and `bID` enviroments.
  2668.  
  2669.  Version 1.254 has a lot of the keyfile and shareware reminder stuff with
  2670.  a completely new concept rewritten. I hope it now works on MS-DOS machines.
  2671.  Note that unregistered MS-DOS versions crashed on some systems.
  2672.  
  2673.  Version 1.258 adds the `storekill`, `closetag` and `closelog` commands. It
  2674.  also fixes some bugs in the terminal enviroment variable storing code. Now
  2675.  `input` may be used as a synonym for `include`, because me and some other
  2676.  TeX freaks messed them up constantly. Finally the error handlig using
  2677.  include files returned the location of the uppermost `include` command. This
  2678.  is fixed by now and the correct location will be displayed.
  2679.  
  2680.  Version 1.260 now monitors all file I/O errors and traps them. So on Amiga
  2681.  systems you should have to press nasty requesters only one time. Originally
  2682.  I wanted to find a bug by tracking I/O activity, but the bug is still in
  2683.  there. During the installation of the control routines I optimized file I/O
  2684.  a little. It seems to me that output got faster even though anything is
  2685.  checked by now. Beyond that two new commands are installed. See `batch` and
  2686.  `nop` for documentation. See also the chapter `errors`, because a whole lot
  2687.  has changed there.
  2688.  
  2689.  Version 1.263 is the result of 10 hours of bug hunt and I finally caught it,
  2690.  it came in with `flushset` and caused weired error messages.
  2691.  
  2692.  Version 1.264 is the recompile of the MS-DOS port. Some smaller bugs in
  2693.  the I/O error handling had been resolved. Beyond that the MS-DOS file
  2694.  I/O has been completely revised. At least with MS-DOS Version 6 everything
  2695.  works all right -- yes the keyfile stuff as well!
  2696.  
  2697.  Report errors, suggestions and registrations to:
  2698.  
  2699.    MGR, Asgard
  2700.    Lars Hanke
  2701.    Schlachthofstr. 67
  2702.    4690 Herne 2
  2703.    Federal republic Germany
  2704.  
  2705.    FIDO: Lars Hanke 2:245/5802.22
  2706.    UUCP: mgr@asgard.bo.open.de
  2707.  
  2708.  Good luck with this program and happy computing!
  2709.  
  2710.  
  2711.